summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/content_type
diff options
context:
space:
mode:
Diffstat (limited to 'lib/axlsx/content_type')
-rw-r--r--lib/axlsx/content_type/abstract_content_type.rb2
-rw-r--r--lib/axlsx/content_type/content_type.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/content_type/abstract_content_type.rb b/lib/axlsx/content_type/abstract_content_type.rb
index 58ca8b2c..bca08b7e 100644
--- a/lib/axlsx/content_type/abstract_content_type.rb
+++ b/lib/axlsx/content_type/abstract_content_type.rb
@@ -24,7 +24,7 @@ module Axlsx
# Serialize the contenty type to xml
def to_xml_string(node_name = '', str = +'')
str << "<#{node_name} "
- str << Axlsx.instance_values_for(self).map { |key, value| Axlsx::camel(key) << '="' << value.to_s << '"' }.join(' ')
+ Axlsx.instance_values_for(self).each { |key, value| str << Axlsx::camel(key) << '="' << value.to_s << '" ' }
str << '/>'
end
end
diff --git a/lib/axlsx/content_type/content_type.rb b/lib/axlsx/content_type/content_type.rb
index 15751b17..22763bfb 100644
--- a/lib/axlsx/content_type/content_type.rb
+++ b/lib/axlsx/content_type/content_type.rb
@@ -16,7 +16,7 @@ module Axlsx
# @return [String]
def to_xml_string(str = +'')
str << '<?xml version="1.0" encoding="UTF-8"?>'
- str << (+'<Types xmlns="' << XML_NS_T << '">')
+ str << '<Types xmlns="' << XML_NS_T << '">'
each { |type| type.to_xml_string(str) }
str << '</Types>'
end