Class: Docxi::ContentTypes::Override
- Inherits:
-
Object
- Object
- Docxi::ContentTypes::Override
- Defined in:
- lib/docxi/content_types/override.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#part_name ⇒ Object
Returns the value of attribute part_name.
Instance Method Summary collapse
- #build(xml) ⇒ Object
-
#initialize(part_name, content_type) ⇒ Override
constructor
A new instance of Override.
Constructor Details
#initialize(part_name, content_type) ⇒ Override
Returns a new instance of Override.
7 8 9 10 |
# File 'lib/docxi/content_types/override.rb', line 7 def initialize(part_name, content_type) @part_name = part_name @content_type = content_type end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
5 6 7 |
# File 'lib/docxi/content_types/override.rb', line 5 def content_type @content_type end |
#part_name ⇒ Object
Returns the value of attribute part_name.
5 6 7 |
# File 'lib/docxi/content_types/override.rb', line 5 def part_name @part_name end |
Instance Method Details
#build(xml) ⇒ Object
12 13 14 |
# File 'lib/docxi/content_types/override.rb', line 12 def build(xml) xml.Override('PartName' => @part_name, 'ContentType' => @content_type) end |