Class: Axlsx::Default
- Inherits:
-
Object
- Object
- Axlsx::Default
- Defined in:
- lib/axlsx/content_type/default.rb
Overview
An default content part. These parts are automatically created by for you based on the content of your package.
Instance Attribute Summary collapse
-
#content_type ⇒ String
(also: #ContentType)
The type of content.
-
#extension ⇒ String
(also: #Extension)
The extension of the content type.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Default
constructor
Creates a new Default object.
-
#to_xml_string(str = '') ⇒ String
Serializes the object.
Constructor Details
#initialize(options = {}) ⇒ Default
Creates a new Default object
20 21 22 23 24 25 |
# File 'lib/axlsx/content_type/default.rb', line 20 def initialize(={}) raise ArgumentError, "extension and content_type are required" unless ([:Extension] || [:extension]) && ([:content_type] || [:ContentType]) .each do |o| self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" end end |
Instance Attribute Details
#content_type ⇒ String Also known as: ContentType
The type of content.
13 14 15 |
# File 'lib/axlsx/content_type/default.rb', line 13 def content_type @content_type end |
#extension ⇒ String Also known as: Extension
The extension of the content type.
8 9 10 |
# File 'lib/axlsx/content_type/default.rb', line 8 def extension @extension end |