Sha256: 0e4b3572b413f0bbd44fdd4788901f31e69b8622f950f50a78a95e9a6a7ca1c4

Contents?: true

Size: 338 Bytes

Versions: 28

Compression:

Stored size: 338 Bytes

Contents

module Deface
  module Actions
    class SetAttributes < AttributeAction
      def execute_for_attribute(target_element, name, value)
        target_element.remove_attribute(name)
        target_element.remove_attribute("data-erb-#{name}")

        target_element.set_attribute("data-erb-#{name}", value.to_s)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre2 vendor/bundle/gems/deface-1.0.1/lib/deface/actions/set_attributes.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/deface-1.0.1/lib/deface/actions/set_attributes.rb
deface-1.0.1 lib/deface/actions/set_attributes.rb
deface-1.0.0 lib/deface/actions/set_attributes.rb
deface-1.0.0.rc4 lib/deface/actions/set_attributes.rb
deface-1.0.0.rc3 lib/deface/actions/set_attributes.rb
deface-1.0.0.rc2 lib/deface/actions/set_attributes.rb
deface-1.0.0.rc1 lib/deface/actions/set_attributes.rb