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_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.
37 38 39 40 |
# File 'lib/idcf/cli/index.rb', line 37 def initialize(*args) @variables = {} super(*args) end |
Class Method Details
.init(arg) ⇒ Object
init
29 30 31 32 33 34 |
# File 'lib/idcf/cli/index.rb', line 29 def init(arg) map COMMAND_MAPS sub_command_regist('controller', File.dirname(__FILE__), arg) rescue => e error_exit(Idcf::Cli::Error::CliError.new(e.)) end |
Instance Method Details
#configure ⇒ Object
65 66 67 68 69 70 |
# File 'lib/idcf/cli/index.rb', line 65 def configure init_f = ARGV[0] == 'init' do_configure(, init_f) rescue => e self.class.error_exit(e) end |
#init ⇒ Object
46 47 48 49 50 51 |
# File 'lib/idcf/cli/index.rb', line 46 def init configure update rescue => e self.class.error_exit(e) end |
#update ⇒ Object
55 56 57 58 59 |
# File 'lib/idcf/cli/index.rb', line 55 def update do_update() rescue => e self.class.error_exit(e) end |
#version ⇒ Object
74 75 76 77 78 |
# File 'lib/idcf/cli/index.rb', line 74 def version puts Idcf::Cli::Conf::Const::VERSION_STR rescue => e self.class.error_exit(e) end |