Class: Axlsx::Override
- Inherits:
-
Object
- Object
- Axlsx::Override
- Defined in:
- lib/axlsx/content_type/override.rb
Overview
An override content part. These parts are automatically created by for you based on the content of your package.
Constant Summary collapse
- INVALID_ARGUMENTS =
Error message for invalid options
'part_name and content_type are required'
Instance Attribute Summary collapse
-
#content_type ⇒ String
(also: #ContentType)
The type of content.
-
#part_name ⇒ String
(also: #PartName)
The name and location of the part.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Override
constructor
Creates a new Override object.
-
#to_xml_string(str = '') ⇒ String
Serializes the object.
Constructor Details
#initialize(options = {}) ⇒ Override
Creates a new Override object
11 12 13 14 15 16 |
# File 'lib/axlsx/content_type/override.rb', line 11 def initialize(={}) raise ArgumentError, INVALID_ARGUMENTS unless () .each do |name, value| self.send("#{name}=", value) if self.respond_to? "#{name}=" end end |
Instance Attribute Details
#content_type ⇒ String Also known as: ContentType
The type of content.
23 24 25 |
# File 'lib/axlsx/content_type/override.rb', line 23 def content_type @content_type end |
#part_name ⇒ String Also known as: PartName
The name and location of the part.
28 29 30 |
# File 'lib/axlsx/content_type/override.rb', line 28 def part_name @part_name end |