Class: Vivlio::Starter::CLI::SamovarCommands::NewCommand

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

Overview

新規書籍プロジェクトを作成する Public コマンド

Instance Method Summary collapse

Instance Method Details

#callObject



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/vivlio/starter/cli/samovar/new_command.rb', line 24

def call
  return print_usage if options[:help]

  NewCommands.run_from_command(self)
rescue SystemExit => e
  raise e
rescue StandardError => e
  Common.log_error("new コマンド実行中にエラー: #{e.message}")
  log_debug(e.full_message) if debug?
  1
end

#system(cmd) ⇒ Object

doctor 実行を委譲するメソッド。テスト時はこのメソッドをスタブ化する。



37
# File 'lib/vivlio/starter/cli/samovar/new_command.rb', line 37

def system(cmd) = Kernel.system(cmd)