Created
November 21, 2012 16:52
-
-
Save aberant/4126008 to your computer and use it in GitHub Desktop.
method class example
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
# http://ruby-doc.org/core-1.9.3/Object.html#method-i-method | |
# http://ruby-doc.org/core-1.9.3/Method.html | |
> User.method(:first) | |
=> #<Method: Class(ActiveRecord::Querying)#first> | |
> User.method(:first).arity | |
=> -1 | |
User.method(:first).source_location | |
=> ["/Users/aberant/.rvm/gems/ruby-1.9.2-p320/gems/activerecord-3.2.2/lib/active_record/querying.rb", | |
4] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment