Sha256: a1a517c0b6332f749299fd05840f7c5c5deafacebe3c2b43490c2167684154c0

Contents?: true

Size: 478 Bytes

Versions: 3

Compression:

Stored size: 478 Bytes

Contents

module Deface
  module Actions
    class SurroundAction < ElementAction
      def source_element
        @cloned_source_element ||= super.clone(1)
      end

      def original_placeholders
        @original_placeholders ||= source_element.css("code:contains('render_original')")
        raise(DefaceError, "The surround action couldn't find <%= render_original %> in your template") unless @original_placeholders.first
        @original_placeholders
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
deface-1.0.0.rc3 lib/deface/actions/surround_action.rb
deface-1.0.0.rc2 lib/deface/actions/surround_action.rb
deface-1.0.0.rc1 lib/deface/actions/surround_action.rb