Skip to content

Instantly share code, notes, and snippets.

@mhorbul
Created August 26, 2010 21:17
Show Gist options
  • Save mhorbul/552278 to your computer and use it in GitHub Desktop.
Save mhorbul/552278 to your computer and use it in GitHub Desktop.
# Rails
# Different interfaces for the similar methods
# Why ?
ruby-1.8.7-p299 > now = Time.now
=> Thu Aug 26 14:16:31 -0700 2010
ruby-1.8.7-p299 > now.ago(10)
=> Thu Aug 26 14:16:21 -0700 2010
ruby-1.8.7-p299 > now.advance(:seconds => 10)
=> Thu Aug 26 14:16:41 -0700 2010
ruby-1.8.7-p299 >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment