Skip to content

Instantly share code, notes, and snippets.

@base10
Created August 1, 2013 15:59
Show Gist options
  • Save base10/6132733 to your computer and use it in GitHub Desktop.
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>'.
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