Class: Deface::Actions::Replace
- Inherits:
-
ElementAction
- Object
- Action
- ElementAction
- Deface::Actions::Replace
- Defined in:
- lib/deface/actions/replace.rb
Instance Attribute Summary
Attributes inherited from ElementAction
Instance Method Summary collapse
Methods inherited from ElementAction
Methods inherited from Action
Constructor Details
This class inherits a constructor from Deface::Actions::ElementAction
Instance Method Details
#execute(target_range) ⇒ Object
4 5 6 7 |
# File 'lib/deface/actions/replace.rb', line 4 def execute(target_range) target_range.first.before(source_element) target_range.map(&:remove) end |
#range_compatible? ⇒ Boolean
9 10 11 |
# File 'lib/deface/actions/replace.rb', line 9 def range_compatible? true end |