Class: Axlsx::ContentType
- Inherits:
-
SimpleTypedList
- Object
- Array
- SimpleTypedList
- Axlsx::ContentType
- Defined in:
- lib/axlsx/content_type/content_type.rb
Overview
ContentTypes used in the package. This is automatically managed by the package package.
Instance Method Summary collapse
-
#initialize ⇒ ContentType
constructor
A new instance of ContentType.
-
#to_xml_string(str = +'')) ⇒ String
Serializes the object.
Constructor Details
#initialize ⇒ ContentType
Returns a new instance of ContentType.
10 11 12 |
# File 'lib/axlsx/content_type/content_type.rb', line 10 def initialize super([Override, Default]) end |
Instance Method Details
#to_xml_string(str = +'')) ⇒ String
Serializes the object
17 18 19 20 21 22 |
# File 'lib/axlsx/content_type/content_type.rb', line 17 def to_xml_string(str = +'') str << '<?xml version="1.0" encoding="UTF-8"?>' str << '<Types xmlns="' << XML_NS_T << '">' each { |type| type.to_xml_string(str) } str << '</Types>' end |