Class: RubyPoint::Slide::Rel

Inherits:
File show all
Defined in:
lib/rubypoint/slide/rel.rb

Instance Attribute Summary

Attributes inherited from File

#doc, #file_path

Attributes inherited from Element

#objects, #parent, #presentation

Instance Method Summary collapse

Methods inherited from File

#<<, #write

Methods inherited from Element

class_attributes

Constructor Details

#initialize(slide) ⇒ Rel

Returns a new instance of Rel.



3
4
5
6
7
8
# File 'lib/rubypoint/slide/rel.rb', line 3

def initialize(slide)
  @parent = slide
  @presenation = slide.presentation
  @file_path = @presenation.slide_directory + "/_rels/slide#{@parent.slide_id}.xml.rels"
  @doc = Hpricot::XML(self.raw_xml)
end

Instance Method Details

#raw_xmlObject



10
11
12
13
14
15
# File 'lib/rubypoint/slide/rel.rb', line 10

def raw_xml
  raw = <<EOF 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" Target="../slideLayouts/slideLayout2.xml"/></Relationships>
EOF
end