Class: RubyPoint::File
Direct Known Subclasses
App, ContentTypes::XML, Presentation::Presentation, PresentationRel, Slide, Slide::Rel
Instance Attribute Summary collapse
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#file_path ⇒ Object
Returns the value of attribute file_path.
Attributes inherited from Element
#objects, #parent, #presentation
Instance Method Summary collapse
Methods inherited from Element
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
3 4 5 |
# File 'lib/rubypoint/file.rb', line 3 def doc @doc end |
#file_path ⇒ Object
Returns the value of attribute file_path.
3 4 5 |
# File 'lib/rubypoint/file.rb', line 3 def file_path @file_path end |
Instance Method Details
#<<(object) ⇒ Object
15 16 17 18 |
# File 'lib/rubypoint/file.rb', line 15 def <<(object) object.parent = self self.objects << object end |
#write ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/rubypoint/file.rb', line 5 def write self.before_write if self.respond_to?(:before_write) self.objects.each do |o| o.write end File.open(@file_path, "w") do |f| f.puts self.doc end end |