Class: OdtFile

Inherits:
OdfFile show all
Defined in:
lib/documenter/ooo/odt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from OdfFile

#close, #load_xml, #random_name, #save_xml

Constructor Details

#initialize(filename) ⇒ OdtFile

Returns a new instance of OdtFile.



86
87
88
89
# File 'lib/documenter/ooo/odt.rb', line 86

def initialize filename
  super filename
  load
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



84
85
86
# File 'lib/documenter/ooo/odt.rb', line 84

def text
  @text
end

Instance Method Details

#loadObject



92
93
94
# File 'lib/documenter/ooo/odt.rb', line 92

def load
  @text = OdtText.new(load_xml)
end

#save(filename) ⇒ Object



101
102
103
104
# File 'lib/documenter/ooo/odt.rb', line 101

def save filename
  save_changes
  super filename
end

#save_changesObject



96
97
98
# File 'lib/documenter/ooo/odt.rb', line 96

def save_changes
  save_xml @text.to_xml
end