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