Class: RubyPoint::ContentTypes::XML::Slide

Inherits:
Element
  • Object
show all
Defined in:
lib/rubypoint/content_types_xml.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#objects, #parent, #presentation

Instance Method Summary collapse

Methods inherited from Element

class_attributes

Constructor Details

#initialize(slide) ⇒ Slide

Returns a new instance of Slide.



34
35
36
# File 'lib/rubypoint/content_types_xml.rb', line 34

def initialize(slide)
  @slide = slide
end

Instance Attribute Details

#slideObject

Returns the value of attribute slide.



32
33
34
# File 'lib/rubypoint/content_types_xml.rb', line 32

def slide
  @slide
end

Instance Method Details

#rawObject



43
44
45
# File 'lib/rubypoint/content_types_xml.rb', line 43

def raw
  %Q{<Override PartName="/ppt/slides/slide#{slide.slide_id}.xml" ContentType="application/vnd.openxmlformats-officedocument.presentationml.slide+xml"/>}
end

#writeObject



38
39
40
41
# File 'lib/rubypoint/content_types_xml.rb', line 38

def write
  # TODO need a freaking better search that this!!!
  @parent.doc.search("//Types").html += self.raw
end