diff options
| author | Jurriaan Pruis <[email protected]> | 2014-01-15 23:44:02 +0100 |
|---|---|---|
| committer | Jurriaan Pruis <[email protected]> | 2014-02-26 20:09:21 +0100 |
| commit | be8e00332c73439cf17083173ea74f1505100df9 (patch) | |
| tree | 383ec2e23fc0a14aa5ad90e139648a79814eeded /lib/axlsx/content_type | |
| parent | a271a7d0f26ecb26d01aad00e094744d6fe8b0d2 (diff) | |
| download | caxlsx-be8e00332c73439cf17083173ea74f1505100df9.tar.gz caxlsx-be8e00332c73439cf17083173ea74f1505100df9.zip | |
Huge refactoring
Do not create huge strings
Let Row inherit from SimpleTypedList
Optimized sanitizing
Optimized validation
And more..
Diffstat (limited to 'lib/axlsx/content_type')
| -rw-r--r-- | lib/axlsx/content_type/abstract_content_type.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/content_type/content_type.rb | 2 |
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 0afaa53f..832ccce6 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 << instance_values.map { |key, value| '' << Axlsx::camel(key) << '="' << value.to_s << '"' }.join(' ') + str << instance_values.map { |key, value| Axlsx::camel(key) << '="' << value.to_s << '"' }.join(' ') str << '/>' end diff --git a/lib/axlsx/content_type/content_type.rb b/lib/axlsx/content_type/content_type.rb index 94d65296..5d36d685 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 |
