Class: VivlioStarter::CLI::SamovarCommands::IndexImportCommand
- Inherits:
-
VsCommand
- Object
- Samovar::Command
- VsCommand
- VivlioStarter::CLI::SamovarCommands::IndexImportCommand
- Defined in:
- lib/vivlio_starter/cli/samovar/index_command.rb
Overview
index:import コマンド - 持ち運び用ファイルから用語集[g]・棄却語 を取り込む
Constant Summary
Constants included from OptionTokenNormalizer
OptionTokenNormalizer::BARE_VALUE_DEFAULTS
Instance Method Summary collapse
Methods included from OptionTokenNormalizer
Instance Method Details
#call ⇒ Object
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/vivlio_starter/cli/samovar/index_command.rb', line 230 def call return print_usage if [:help] guard_failure = Guards.precheck(Guards::ProjectRootCheck.new) return guard_failure if guard_failure path = IndexCommands::IndexLibrary.resolve_path((args || []).first) Common.log_info("取り込み元: #{path}") result = IndexCommands::IndexLibrary.new.import!(path, prefer_import: [:prefer_import]) result ? 0 : 1 rescue SystemExit => e raise e rescue StandardError => e Common.log_error("index:import 実行中にエラー: #{e.}") 1 end |