Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# given hash like { :weeks => 1 } or { :months => -2 }, always return hash with a negative value
def past(interval)
k,v = interval.to_a[0]
interval[k] = v.abs * -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.