Class: OdtFile
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(filename) ⇒ OdtFile
constructor
A new instance of OdtFile.
- #load ⇒ Object
- #save(filename) ⇒ Object
- #save_changes ⇒ Object
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
#text ⇒ Object
Returns the value of attribute text.
84 85 86 |
# File 'lib/documenter/ooo/odt.rb', line 84 def text @text end |
Instance Method Details
#load ⇒ Object
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_changes ⇒ Object
96 97 98 |
# File 'lib/documenter/ooo/odt.rb', line 96 def save_changes save_xml @text.to_xml end |