summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/content_type
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-04-03 08:38:37 +0900
committerRandy Morgan <[email protected]>2012-04-03 08:38:37 +0900
commit7df172a8f3815e1291f41098705650afd5a2b41d (patch)
tree35f25742e09201a50c595ac0250c000a3c272c65 /lib/axlsx/content_type
parent6f998ecb098c2a3a5eabc6f8ef44a0f25632f2c8 (diff)
downloadcaxlsx-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.rb5
-rw-r--r--lib/axlsx/content_type/default.rb3
-rw-r--r--lib/axlsx/content_type/override.rb4
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(' ')