Class: Mmmm::ObjectMethod
- Inherits:
-
Object
- Object
- Mmmm::ObjectMethod
- Defined in:
- lib/mmmm/object_method.rb
Instance Method Summary collapse
-
#initialize(obj, method_name) ⇒ ObjectMethod
constructor
A new instance of ObjectMethod.
- #inspect ⇒ Object
Constructor Details
#initialize(obj, method_name) ⇒ ObjectMethod
Returns a new instance of ObjectMethod.
3 4 5 6 |
# File 'lib/mmmm/object_method.rb', line 3 def initialize obj, method_name ancs = all_ancestors(obj) @locs_in_all_ancs = instance_method_locations(method_name, ancs) end |
Instance Method Details
#inspect ⇒ Object
8 9 10 11 12 |
# File 'lib/mmmm/object_method.rb', line 8 def inspect @locs_in_all_ancs. map{|file, line| [file.cyan, line].join(' ')}. join("\n") end |