Class: Nokogiri::XML::Node
Overview
Adds or updates the given attribute or attributes.
Instance Method Summary (collapse)
-
- (Object) append_fragment(html_to_append)
Parses and appends the given html fragment to the end of this node.
- - (Object) merge!(new_attributes)
Instance Method Details
- (Object) append_fragment(html_to_append)
Parses and appends the given html fragment to the end of this node.
17 18 19 20 21 |
# File 'lib/effigy/nokogiri_ext.rb', line 17 def append_fragment(html_to_append) fragment(html_to_append).children.each do |child| self << child end end |
- (Object) merge!(new_attributes)
9 10 11 12 13 |
# File 'lib/effigy/nokogiri_ext.rb', line 9 def merge!(new_attributes) new_attributes.each do |name, value| self[name.to_s] = value end end |