Created
April 29, 2011 13:37
-
-
Save kaos12/948303 to your computer and use it in GitHub Desktop.
look ma', no hands!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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