Class: Epuber::Compiler::FileTypes::OPFFile

Inherits:
GeneratedFile show all
Defined in:
lib/epuber/compiler/file_types/opf_file.rb

Instance Attribute Summary

Attributes inherited from GeneratedFile

#content

Attributes inherited from AbstractFile

#destination_path, #final_destination_path, #group, #path_type, #pkg_destination_path, #properties

Instance Method Summary collapse

Methods inherited from GeneratedFile

#write_generate

Methods inherited from AbstractFile

#==, file_copy, file_copy!, file_copy?, write_to_file, write_to_file!, write_to_file?

Constructor Details

#initializeOPFFile

Returns a new instance of OPFFile.



11
12
13
14
15
16
# File 'lib/epuber/compiler/file_types/opf_file.rb', line 11

def initialize
  super

  self.destination_path = File.join(Epuber::Compiler::EPUB_CONTENT_FOLDER, 'content.opf')
  self.path_type = :package
end

Instance Method Details

#process(compilation_context) ⇒ Object

Parameters:



20
21
22
23
# File 'lib/epuber/compiler/file_types/opf_file.rb', line 20

def process(compilation_context)
  gen = OPFGenerator.new(compilation_context)
  write_generate(gen.generate_opf.to_s)
end