Class: Docxi::ContentTypes::Default

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(extension, content_type) ⇒ Default

Returns a new instance of Default.



7
8
9
10
# File 'lib/docxi/content_types/default.rb', line 7

def initialize(extension, content_type)
  @extension = extension
  @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/default.rb', line 5

def content_type
  @content_type
end

#extensionObject

Returns the value of attribute extension.



5
6
7
# File 'lib/docxi/content_types/default.rb', line 5

def extension
  @extension
end

Instance Method Details

#build(xml) ⇒ Object



12
13
14
# File 'lib/docxi/content_types/default.rb', line 12

def build(xml)
  xml.Default('Extension' => @extension, 'ContentType' => @content_type)
end