Class: Vivlio::Starter::CLI::SamovarCommands::OpenCommand

Inherits:
Samovar::Command
  • Object
show all
Defined in:
lib/vivlio/starter/cli/samovar/open_command.rb

Overview

open コマンド - 生成されたPDFを開く

Instance Method Summary collapse

Instance Method Details

#callObject



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/vivlio/starter/cli/samovar/open_command.rb', line 26

def call
  apply_verbose

  if options[:help]
    print_usage
    return 0
  end

  PdfCommands.execute_open_pdf(build_options, target)
  0
rescue SystemExit => e
  raise e
rescue StandardError => e
  Common.log_error("open 実行中にエラー: #{e.message}")
  Common.log_error(e.backtrace.first(5).join("\n")) if ENV['VERBOSE']
  1
end