Created
August 26, 2010 21:17
-
-
Save mhorbul/552278 to your computer and use it in GitHub Desktop.
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
| # 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