Class: Mmmm::ObjectMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/mmmm/object_method.rb

Instance Method Summary collapse

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

#inspectObject



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