Class: Synvert::Core::Rewriter::RemoveAction
- Defined in:
- lib/synvert/core/rewriter/action/remove_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.
6 7 8 |
# File 'lib/synvert/core/rewriter/action/remove_action.rb', line 6 def initialize(instance, code=nil) super end |
Instance Method Details
#begin_pos ⇒ Integer
Begin position of code to replace.
13 14 15 |
# File 'lib/synvert/core/rewriter/action/remove_action.rb', line 13 def begin_pos @node.loc.expression.begin_pos end |
#end_pos ⇒ Integer
End position of code to replace.
20 21 22 |
# File 'lib/synvert/core/rewriter/action/remove_action.rb', line 20 def end_pos @node.loc.expression.end_pos end |
#rewritten_code ⇒ Object
The rewritten code, always empty string.
25 26 27 |
# File 'lib/synvert/core/rewriter/action/remove_action.rb', line 25 def rewritten_code '' end |