class Deface::Actions::ReplaceContents
Public Instance Methods
execute(target_range)
click to toggle source
# File lib/deface/actions/replace_contents.rb, line 4 def execute(target_range) if target_range.length == 1 target_range.first.children.remove target_range.first.add_child(source_element) else target_range[1..-2].map(&:remove) target_range.first.after(source_element) end end
range_compatible?()
click to toggle source
# File lib/deface/actions/replace_contents.rb, line 14 def range_compatible? true end