Class: Docxi::ContentTypes::Override

Inherits:
Object
  • Object
show all
Defined in:
lib/docxi/content_types/override.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeObject

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_nameObject

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