Created
August 1, 2013 15:59
-
-
Save base10/6132733 to your computer and use it in GitHub Desktop.
Monkey patching Fixnum to shorten looking at epoch strings. Doing a bit of this today and I got tired of typing 'Time.at <epoch value>'.
This file contains hidden or 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 at | |
Time.at self | |
end | |
end | |
# [36] pry(main)> 1374575803.at | |
# => 2013-07-23 06:36:43 -0400 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment