Module: Pubgen::Container

Defined in:
lib/pubgen/container.rb

Class Method Summary collapse

Class Method Details

.generateObject

Generates the container XML. It contains the OPF file path.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/pubgen/container.rb', line 9

def self.generate
  <<EOF
<?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:\
container">
  <rootfiles>
<rootfile full-path="#{opf_path}" media-type="application/\
oebps-package+xml"/>
  </rootfiles>
</container>
EOF
end

.opf_pathObject

Returns the OPF file path.



4
5
6
# File 'lib/pubgen/container.rb', line 4

def self.opf_path
  'content.opf'
end