Class: NodeMutation::RemoveAction
- Defined in:
- lib/node_mutation/action/remove_action.rb
Overview
RemoveAction to remove current node.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(node, adapter:, and_comma: false) ⇒ RemoveAction
constructor
Initialize a RemoveAction.
-
#new_code ⇒ Object
The rewritten code, always empty string.
Methods inherited from Action
Constructor Details
#initialize(node, adapter:, and_comma: false) ⇒ RemoveAction
Initialize a RemoveAction.
10 11 12 13 14 |
# File 'lib/node_mutation/action/remove_action.rb', line 10 def initialize(node, adapter:, and_comma: false) super(node, nil, adapter: adapter) @and_comma = and_comma @type = :delete end |
Instance Method Details
#new_code ⇒ Object
The rewritten code, always empty string.
17 18 19 |
# File 'lib/node_mutation/action/remove_action.rb', line 17 def new_code '' end |