Class: XDry::AfterDefineIP
- Inherits:
-
InsertionPoint
- Object
- InsertionPoint
- XDry::AfterDefineIP
- Defined in:
- lib/xdry/patching/insertion_points.rb
Instance Attribute Summary
Attributes inherited from InsertionPoint
Instance Method Summary collapse
- #find! ⇒ Object
-
#initialize(scope) ⇒ AfterDefineIP
constructor
A new instance of AfterDefineIP.
Methods inherited from InsertionPoint
Constructor Details
#initialize(scope) ⇒ AfterDefineIP
Returns a new instance of AfterDefineIP.
140 141 142 143 |
# File 'lib/xdry/patching/insertion_points.rb', line 140 def initialize scope @scope = scope super() end |
Instance Method Details
#find! ⇒ Object
145 146 147 148 149 150 |
# File 'lib/xdry/patching/insertion_points.rb', line 145 def find! child_nodes = @scope.children.select { |child| child.is_a? NDefine } unless child_nodes.empty? after child_nodes.last end end |