method definition location
Want to find the location of a method definition?
ruby-1.9.2-p290 :003 > Order.last.method(:bill_address_id=).source_location => ["/Users/gagan/.rvm/gems/ruby-1.9.2-p290/bundler/gems/spree_address_book-f261e916b432/app/models/order_decorator.rb", 19]
Or if the method is a class method do
> ActionView::Helpers::AssetTagHelper.method(:cache_asset_timestamps).source_location => ["/Users/gagan/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.10/lib/active_support/core_ext/module/attribute_accessors.rb", 10]
Advertisements
Leave a Comment