Class: RubyXL::Writer::RootRelsWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/rubyXL/writer/root_rels_writer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dirpath, wb) ⇒ RootRelsWriter

Returns a new instance of RootRelsWriter.



13
14
15
16
# File 'lib/rubyXL/writer/root_rels_writer.rb', line 13

def initialize(dirpath, wb)
  @dirpath = dirpath
  @wb = wb
end

Instance Attribute Details

#dirpathObject

Returns the value of attribute dirpath.



11
12
13
# File 'lib/rubyXL/writer/root_rels_writer.rb', line 11

def dirpath
  @dirpath
end

#workbookObject

Returns the value of attribute workbook.



11
12
13
# File 'lib/rubyXL/writer/root_rels_writer.rb', line 11

def workbook
  @workbook
end

Instance Method Details

#writeObject



18
19
20
21
22
# File 'lib/rubyXL/writer/root_rels_writer.rb', line 18

def write()
  contents = '<?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/officeDocument" Target="xl/workbook.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/></Relationships>'
  contents
end