class Idcf::Cli::Index
Constants
- COMMAND_MAPS
command alias [alias] => [command]
Public Class Methods
init(arg)
click to toggle source
init
@param arg [Hash] options
# 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.message)) end
new(*args)
click to toggle source
Calls superclass method
# File lib/idcf/cli/index.rb, line 51 def initialize(*args) @variables = {} super(*args) end
Protected Class Methods
add_classify_rule()
click to toggle source
add classify rule
# File lib/idcf/cli/index.rb, line 42 def add_classify_rule Idcf::Cli::Conf::Const::CLASSIFY_RULE.each do |rule| ActiveSupport::Inflector.inflections do |inflect| inflect.irregular(*rule) end end end
Public Instance Methods
configure()
click to toggle source
# File lib/idcf/cli/index.rb, line 79 def configure init_f = ARGV[0] == 'init' do_configure(options, init_f) rescue StandardError => e self.class.error_exit(e) end
init()
click to toggle source
# File lib/idcf/cli/index.rb, line 60 def init configure update rescue StandardError => e self.class.error_exit(e) end
update()
click to toggle source
# File lib/idcf/cli/index.rb, line 69 def update do_update(options) rescue StandardError => e self.class.error_exit(e) end
version()
click to toggle source
# 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