Class: NodeMutation::DeleteAction
- Defined in:
- lib/node_mutation/action/delete_action.rb
Overview
DeleteAction deletes child nodes.
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(node, *selectors, adapter:, and_comma: false) ⇒ DeleteAction
constructor
Initialize a DeleteAction.
-
#new_code ⇒ Object
The rewritten code, always empty string.
Methods inherited from Action
Constructor Details
#initialize(node, *selectors, adapter:, and_comma: false) ⇒ DeleteAction
Initialize a DeleteAction.
11 12 13 14 15 16 |
# File 'lib/node_mutation/action/delete_action.rb', line 11 def initialize(node, *selectors, adapter:, and_comma: false) super(node, nil, adapter: adapter) @selectors = selectors @and_comma = and_comma @type = :delete end |
Instance Method Details
#new_code ⇒ Object
The rewritten code, always empty string.
19 20 21 |
# File 'lib/node_mutation/action/delete_action.rb', line 19 def new_code '' end |