Class: Kitabu::Exporter::Mobi

Inherits:
Base
  • Object
show all
Defined in:
lib/kitabu/exporter/mobi.rb

Instance Attribute Summary

Attributes inherited from Base

#root_dir, #source

Instance Method Summary collapse

Methods inherited from Base

#config, #copy_directory, export, #handle_error, #initialize, #name, #render_template, #source_list, #spawn_command, #ui

Constructor Details

This class inherits a constructor from Kitabu::Exporter::Base

Instance Method Details

#epub_fileObject



16
17
18
# File 'lib/kitabu/exporter/mobi.rb', line 16

def epub_file
  root_dir.join("output/#{name}.epub")
end

#exportObject



6
7
8
9
10
# File 'lib/kitabu/exporter/mobi.rb', line 6

def export
  super
  spawn_command ["ebook-convert", epub_file.to_s, mobi_file.to_s]
  true
end

#mobi_fileObject



12
13
14
# File 'lib/kitabu/exporter/mobi.rb', line 12

def mobi_file
  root_dir.join("output/#{name}.mobi")
end