Class: Softcover::Builders::Mobi
- Inherits:
-
Softcover::Builder
- Object
- Softcover::Builder
- Softcover::Builders::Mobi
- Defined in:
- lib/softcover/builders/mobi.rb
Constant Summary
Constants included from Utils
Instance Attribute Summary
Attributes inherited from Softcover::Builder
Instance Method Summary collapse
Methods inherited from Softcover::Builder
Methods included from Utils
#add_highlight_class!, #as_size, #current_book, #digest, #executable, #execute, #in_book_directory?, #logged_in?, #mkdir, #path, #reset_current_book!, #rm, #silence, #source, #tmpify, #write_pygments_file
Constructor Details
This class inherits a constructor from Softcover::Builder
Instance Method Details
#build!(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/softcover/builders/mobi.rb', line 5 def build!(={}) Softcover::Builders::Epub.new.build!() filename = manifest.filename filename += '-preview' if [:preview] command = "#{kindlegen} ebooks/#{filename}.epub" # Because of the way kindlegen uses tempfiles, testing for the # actual generation of the MOBI causes an error, so in tests # we just return the command. if [:quiet] || [:silent] silence { Softcover.test? ? command : system(command) } else Softcover.test? ? command : system(command) end end |