Class: XDry::BeforeSuperCallIP
- Inherits:
-
InsertionPoint
- Object
- InsertionPoint
- XDry::BeforeSuperCallIP
- Defined in:
- lib/xdry/patching/insertion_points.rb
Instance Attribute Summary
Attributes inherited from InsertionPoint
Instance Method Summary collapse
- #find! ⇒ Object
-
#initialize(scope) ⇒ BeforeSuperCallIP
constructor
A new instance of BeforeSuperCallIP.
Methods inherited from InsertionPoint
Constructor Details
#initialize(scope) ⇒ BeforeSuperCallIP
Returns a new instance of BeforeSuperCallIP.
104 105 106 107 |
# File 'lib/xdry/patching/insertion_points.rb', line 104 def initialize scope @scope = scope super() end |
Instance Method Details
#find! ⇒ Object
109 110 111 112 113 114 115 116 |
# File 'lib/xdry/patching/insertion_points.rb', line 109 def find! child_node = @scope.children.find { |child| child.is_a? NSuperCall } if child_node.nil? indented_before @scope.ending_node else before child_node end end |