diff options
| author | Randy Morgan <[email protected]> | 2012-04-03 08:38:37 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-04-03 08:38:37 +0900 |
| commit | 7df172a8f3815e1291f41098705650afd5a2b41d (patch) | |
| tree | 35f25742e09201a50c595ac0250c000a3c272c65 /lib/axlsx/content_type | |
| parent | 6f998ecb098c2a3a5eabc6f8ef44a0f25632f2c8 (diff) | |
| download | caxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.tar.gz caxlsx-7df172a8f3815e1291f41098705650afd5a2b41d.zip | |
pre-release cleanup
Diffstat (limited to 'lib/axlsx/content_type')
| -rw-r--r-- | lib/axlsx/content_type/content_type.rb | 5 | ||||
| -rw-r--r-- | lib/axlsx/content_type/default.rb | 3 | ||||
| -rw-r--r-- | lib/axlsx/content_type/override.rb | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/lib/axlsx/content_type/content_type.rb b/lib/axlsx/content_type/content_type.rb index 6b4facd0..003991c7 100644 --- a/lib/axlsx/content_type/content_type.rb +++ b/lib/axlsx/content_type/content_type.rb @@ -10,8 +10,9 @@ module Axlsx super [Override, Default] end - # serialize the content types - # @return [String] str + # Serializes the object + # @param [String] str + # @return [String] def to_xml_string(str = '') str << '<?xml version="1.0" encoding="UTF-8"?>' str << '<Types xmlns="' << XML_NS_T << '">' diff --git a/lib/axlsx/content_type/default.rb b/lib/axlsx/content_type/default.rb index 2ff24527..c7cedd14 100644 --- a/lib/axlsx/content_type/default.rb +++ b/lib/axlsx/content_type/default.rb @@ -28,6 +28,9 @@ module Axlsx # @see Axlsx#validate_content_type def ContentType=(v) Axlsx::validate_content_type v; @ContentType = v end + # Serializes the object + # @param [String] str + # @return [String] def to_xml_string(str = '') str << '<Default ' str << instance_values.map { |key, value| '' << key.to_s << '="' << value.to_s << '"' }.join(' ') diff --git a/lib/axlsx/content_type/override.rb b/lib/axlsx/content_type/override.rb index 665a538a..eadf8e78 100644 --- a/lib/axlsx/content_type/override.rb +++ b/lib/axlsx/content_type/override.rb @@ -29,7 +29,9 @@ module Axlsx # @see Axlsx#validate_content_type def ContentType=(v) Axlsx::validate_content_type v; @ContentType = v end - # Serialize the Override + # Serializes the object + # @param [String] str + # @return [String] def to_xml_string(str = '') str << '<Override ' str << instance_values.map { |key, value| '' << key.to_s << '="' << value.to_s << '"' }.join(' ') |
