Class: Deface::Actions::SurroundAction
- Inherits:
-
ElementAction
- Object
- Action
- ElementAction
- Deface::Actions::SurroundAction
- Defined in:
- lib/deface/actions/surround_action.rb
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from ElementAction
Methods inherited from Action
#initialize, #range_compatible?, to_sym
Constructor Details
This class inherits a constructor from Deface::Actions::ElementAction
Instance Method Details
#original_placeholders ⇒ Object
8 9 10 11 12 |
# File 'lib/deface/actions/surround_action.rb', line 8 def original_placeholders @original_placeholders ||= source_element.css("erb:contains('render_original')") raise(DefaceError, "The surround action couldn't find <%= render_original %> in your template") unless @original_placeholders.first @original_placeholders end |
#source_element ⇒ Object
4 5 6 |
# File 'lib/deface/actions/surround_action.rb', line 4 def source_element @cloned_source_element ||= super.clone(1) end |