Class: VivlioStarter::CLI::EpubCommands::EpubCommandRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/vivlio_starter/cli/epub.rb

Overview

Vivliostyle CLI を --format epub で実行して EPUB を生成する

Instance Method Summary collapse

Constructor Details

#initialize(options, target_output = nil, config_path:, output_path:) ⇒ EpubCommandRunner

Returns a new instance of EpubCommandRunner.



39
40
41
42
43
44
45
# File 'lib/vivlio_starter/cli/epub.rb', line 39

def initialize(options, target_output = nil, config_path:, output_path:)
  @options = options || {}
  @target_output = target_output
  @config_path = config_path
  @output_path = output_path
  @build_success = false
end

Instance Method Details

#callBoolean

EPUB ビルドを実行し、成功時にリネームする

Returns:

  • (Boolean)

    ビルド成功なら true



49
50
51
52
53
54
55
# File 'lib/vivlio_starter/cli/epub.rb', line 49

def call
  apply_verbose
  Common.log_action('EPUB を生成しています…')
  execute_build
  handle_build_result
  @build_success
end