Class: Odf::Document::Text

Inherits:
Abstract show all
Defined in:
lib/odf/document/text.rb

Constant Summary collapse

MIME_TYPE =
'application/vnd.oasis.opendocument.text'.freeze
EXTENSION =
'odt'.freeze
WRAPPER =
'office:text'.freeze

Constants inherited from Abstract

Abstract::COMPONENTS

Instance Attribute Summary

Attributes inherited from Abstract

#creator

Instance Method Summary collapse

Methods inherited from Abstract

#add_image, #components, #extension, #initialize, #media_type, #root, #serialize, #to_blob, #wrapper

Constructor Details

This class inherits a constructor from Odf::Document::Abstract

Instance Method Details

#add_heading(text, options = {}) ⇒ Object



8
9
10
# File 'lib/odf/document/text.rb', line 8

def add_heading(text, options = {})
  Odf::Element::Heading.build(self, text, options)
end

#add_paragraph(text, options = {}) ⇒ Object



12
13
14
# File 'lib/odf/document/text.rb', line 12

def add_paragraph(text, options = {})
  Odf::Element::Paragraph.build(self, text, options)
end