New gem: method_locator released

Method Locator is a Ruby gem that allows you to easily determine the
method lookup path of a particular object / class / module, as well as
find all places (represented as UnboundMethod instances) where a
callable method is defined on an object. This is very useful in an
environment such as Rails where you are unsure where a method may be
defined or overridden. Note that by default, Ruby tends to hide
singleton classes when you invoke Module#ancestors. The new
Object#method_lookup_path does not hide these singleton classes and will
return them, so that you get a true representation of how Ruby performs
lookups for methods.

This library will make more sense if you understand Ruby’s object model
and method lookup path. A great explanation of this can be found in the
following article by Andrea Singh: Ruby’s Eigenclasses Demystified

Enjoy!

Thanks,
Ryan LeCompte
Twitter: @ryanlecompte
GitHub: https://github.com/ryanlecompte

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs