lib/goldendocx/element.rb in goldendocx-0.2.3 vs lib/goldendocx/element.rb in goldendocx-0.3.0
- old
+ new
@@ -62,15 +62,15 @@
def tag_name
@tag_name ||= [namespace, tag].compact.join(':')
end
- def to_element(**context, &block)
- Goldendocx.xml_serializer.build_element(tag_name, **context) { |xml| build_element(xml, &block) }
+ def to_element(**context, &)
+ Goldendocx.xml_serializer.build_element(tag_name, **context) { |xml| build_element(xml, &) }
end
- def to_xml(&block)
- Goldendocx.xml_serializer.build_xml(tag_name) { |xml| build_element(xml, &block) }
+ def to_xml(&)
+ Goldendocx.xml_serializer.build_xml(tag_name) { |xml| build_element(xml, &) }
end
def build_element(xml)
attributes.each { |name, value| xml[name] = value }
unparsed_attributes.each { |name, value| xml[name] = value }