lib/hexp/node/attributes.rb in hexp-0.4.1 vs lib/hexp/node/attributes.rb in hexp-0.4.2
- old
+ new
@@ -122,16 +122,14 @@
#
# @api public
def set_attrs(attrs)
H[
self.tag,
- self.attributes.merge(Hash[*attrs.flat_map{|k,v| [k.to_s, v]}]),
+ Hash[*attrs.flat_map{|k,v| [k.to_s, v]}],
self.children
]
end
- alias :% :set_attrs
- alias :add_attributes :set_attrs
# Remove an attribute by name
#
# @param [#to_s] name
# The attribute to be removed
@@ -186,8 +184,10 @@
result.attr(key, value)
end
end
result
end
+ alias :% :merge_attrs
+
end
end
end