Class: Deface::Actions::SurroundAction

Inherits:
ElementAction show all
Defined in:
lib/deface/actions/surround_action.rb

Direct Known Subclasses

Surround, SurroundContents

Instance Method Summary collapse

Methods inherited from ElementAction

#initialize

Methods inherited from Action

#initialize, #range_compatible?, to_sym

Constructor Details

This class inherits a constructor from Deface::Actions::ElementAction

Instance Method Details

#original_placeholdersObject

Raises:



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_elementObject



4
5
6
# File 'lib/deface/actions/surround_action.rb', line 4

def source_element
  @cloned_source_element ||= super.clone(1)
end