Class: Synvert::Core::Rewriter::RemoveAction
- Defined in:
- lib/synvert/core/rewriter/action.rb
Overview
RemoveAction to remove code.
Instance Method Summary collapse
-
#begin_pos ⇒ Integer
Begin position of code to replace.
-
#end_pos ⇒ Integer
End position of code to replace.
-
#initialize(instance, code = nil) ⇒ RemoveAction
constructor
A new instance of RemoveAction.
-
#rewritten_code ⇒ Object
The rewritten code, always empty string.
Methods inherited from Action
#<=>, #line, #rewritten_source
Constructor Details
#initialize(instance, code = nil) ⇒ RemoveAction
Returns a new instance of RemoveAction.
203 204 205 |
# File 'lib/synvert/core/rewriter/action.rb', line 203 def initialize(instance, code=nil) super end |
Instance Method Details
#begin_pos ⇒ Integer
Begin position of code to replace.
210 211 212 |
# File 'lib/synvert/core/rewriter/action.rb', line 210 def begin_pos @node.loc.expression.begin_pos end |
#end_pos ⇒ Integer
End position of code to replace.
217 218 219 |
# File 'lib/synvert/core/rewriter/action.rb', line 217 def end_pos @node.loc.expression.end_pos end |
#rewritten_code ⇒ Object
The rewritten code, always empty string.
222 223 224 |
# File 'lib/synvert/core/rewriter/action.rb', line 222 def rewritten_code '' end |