Module: Book::Features

Defined in:
lib/epub/maker.rb

Instance Method Summary collapse

Instance Method Details

#make_ocfObject



65
66
67
68
69
70
71
# File 'lib/epub/maker.rb', line 65

def make_ocf
  self.ocf = OCF.new
  ocf.make do |ocf|
    yield ocf if block_given?
  end
  ocf
end

#make_packageObject



73
74
75
76
77
78
79
# File 'lib/epub/maker.rb', line 73

def make_package
  self.package = Publication::Package.new
  package.make do |package|
    yield package if block_given?
  end
  package
end

#save(archive) ⇒ Object

Parameters:

  • archive (Zip::Archive)


82
83
84
85
86
87
88
# File 'lib/epub/maker.rb', line 82

def save(archive)
  ocf.save archive
  package.save archive
  resources.each do |item|
    item.save archive
  end
end