Class: Klipbook::Commands::Export

Inherits:
Command
  • Object
show all
Defined in:
lib/klipbook/commands/export.rb

Instance Method Summary collapse

Methods inherited from Command

#initialize, #run!

Constructor Details

This class inherits a constructor from Klipbook::Commands::Command

Instance Method Details

#run_command!(book_source, options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/klipbook/commands/export.rb', line 4

def run_command!(book_source, options)
  exit_unless_valid_format(options)
  exit_unless_valid_output_dir(options)

  exporter(options).run!(
    books: book_source.books,
    force: options.force,
    output_dir: options.output_dir
  )
end