Skip to content

Instantly share code, notes, and snippets.

@kaos12
Created April 29, 2011 13:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaos12/948303 to your computer and use it in GitHub Desktop.
Save kaos12/948303 to your computer and use it in GitHub Desktop.
look ma', no hands!
class Fixnum
def hour
self * 60
end
alias :hours hour
def minute
self
end
alias :minutes minute
def and(&block)
self + block.call()
end
end
3.hours.and{45.minutes}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment