Module: Book::Features
- Defined in:
- lib/epub/maker.rb
Instance Method Summary collapse
Instance Method Details
#make_ocf ⇒ Object
107 108 109 110 111 112 113 |
# File 'lib/epub/maker.rb', line 107 def make_ocf self.ocf = OCF.new ocf.make do |ocf| yield ocf if block_given? end ocf end |
#make_package ⇒ Object
115 116 117 118 119 120 121 122 123 124 |
# File 'lib/epub/maker.rb', line 115 def make_package package = Publication::Package.new package.book = self no_package_rootfile = rootfiles.find {|rf| rf.package.nil?} no_package_rootfile.package = package if no_package_rootfile package.make do |package| yield package if block_given? end package end |
#save ⇒ Object
126 127 128 129 130 |
# File 'lib/epub/maker.rb', line 126 def save ocf.save packages.each(&:save) resources.each(&:save) end |