Class: Idcf::Cli::Index
- Includes:
- Extend::Init
- Defined in:
- lib/idcf/cli/index.rb
Overview
Index
Constant Summary collapse
- COMMAND_MAPS =
command alias [alias] => [command]
{}.freeze
Constants included from Extend::UpdateFile
Extend::UpdateFile::BROKEN_JSON_SCHEMA, Extend::UpdateFile::BROKEN_UPDATE_FILE
Class Method Summary collapse
-
.init(arg) ⇒ Object
init.
Instance Method Summary collapse
- #configure ⇒ Object
- #init ⇒ Object
-
#initialize(*args) ⇒ Index
constructor
A new instance of Index.
- #update ⇒ Object
- #version ⇒ Object
Methods inherited from Thor
command_help_string, command_regist, description, error_exit, exit_on_failure?, module_path, sub_command_regist, subcommand_structure
Constructor Details
#initialize(*args) ⇒ Index
Returns a new instance of Index.
51 52 53 54 |
# File 'lib/idcf/cli/index.rb', line 51 def initialize(*args) @variables = {} super(*args) end |
Class Method Details
.init(arg) ⇒ Object
init
29 30 31 32 33 34 35 36 37 |
# File 'lib/idcf/cli/index.rb', line 29 def init(arg) map COMMAND_MAPS add_classify_rule sub_command_regist('controller', File.dirname(__FILE__), arg) rescue Idcf::Cli::Error::CliError => e error_exit(e) rescue StandardError => e error_exit(Idcf::Cli::Error::CliError.new(e.)) end |
Instance Method Details
#configure ⇒ Object
79 80 81 82 83 84 |
# File 'lib/idcf/cli/index.rb', line 79 def configure init_f = ARGV[0] == 'init' do_configure(, init_f) rescue StandardError => e self.class.error_exit(e) end |
#init ⇒ Object
60 61 62 63 64 65 |
# File 'lib/idcf/cli/index.rb', line 60 def init configure update rescue StandardError => e self.class.error_exit(e) end |
#update ⇒ Object
69 70 71 72 73 |
# File 'lib/idcf/cli/index.rb', line 69 def update do_update() rescue StandardError => e self.class.error_exit(e) end |
#version ⇒ Object
88 89 90 91 92 |
# File 'lib/idcf/cli/index.rb', line 88 def version puts Idcf::Cli::Conf::Const::VERSION_STR rescue StandardError => e self.class.error_exit(e) end |