Skip to content

Instantly share code, notes, and snippets.

@Slowhand0309
Created January 31, 2016 08:03
Show Gist options
  • Save Slowhand0309/425e24a5cd01b5a0d0a6 to your computer and use it in GitHub Desktop.
Save Slowhand0309/425e24a5cd01b5a0d0a6 to your computer and use it in GitHub Desktop.
Search the defined location for extended method. (ruby)
ex)
irb
2.1.0 :001 > require 'active_support'
=> true
2.1.0 :002 > cahce = ActiveSupport::Cache::MemoryStore.new
=> <#ActiveSupport::Cache::MemoryStore entries=0, size=0, options={}>
2.1.0 :006 > cahce.method(:blank?).source_location
=> ["/Users/xxxx/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.5.1/lib/active_support/core_ext/object/blank.rb", 16]
2.1.0 :007 > cahce.method(:blank?).owner
=> Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment