Class: XDry::MethodPatcher

Inherits:
ItemPatcher show all
Defined in:
lib/xdry/patching/item_patchers.rb

Instance Attribute Summary collapse

Attributes inherited from ItemPatcher

#item, #patcher

Instance Method Summary collapse

Methods inherited from ItemPatcher

#found?

Constructor Details

#initialize(patcher, oclass, selector, insertion_point, new_code) ⇒ MethodPatcher

Returns a new instance of MethodPatcher.



53
54
55
56
57
58
59
# File 'lib/xdry/patching/item_patchers.rb', line 53

def initialize patcher, oclass, selector, insertion_point, new_code
  @oclass = oclass
  @selector = selector
  @insertion_point = insertion_point
  @new_code = new_code
  super(patcher)
end

Instance Attribute Details

#insertion_pointObject (readonly)

Returns the value of attribute insertion_point.



50
51
52
# File 'lib/xdry/patching/item_patchers.rb', line 50

def insertion_point
  @insertion_point
end

#new_codeObject (readonly)

Returns the value of attribute new_code.



51
52
53
# File 'lib/xdry/patching/item_patchers.rb', line 51

def new_code
  @new_code
end

#oclassObject (readonly)

Returns the value of attribute oclass.



49
50
51
# File 'lib/xdry/patching/item_patchers.rb', line 49

def oclass
  @oclass
end