class ECSHelper::Command
Constants
- AVAILABLE_COMMANDS
- CMD_MAPPING
Attributes
command[RW]
helper[RW]
type[RW]
Public Class Methods
new(helper)
click to toggle source
# File lib/ecs_helper/command.rb, line 21 def initialize(helper) @helper = helper @type = ARGV.shift @command = klass.new(helper) end
Public Instance Methods
klass()
click to toggle source
# File lib/ecs_helper/command.rb, line 27 def klass CMD_MAPPING[type] || begin puts "Command not found".light_white puts "Available commands are #{AVAILABLE_COMMANDS}".light_white puts global_option_parser exit end end
options()
click to toggle source
# File lib/ecs_helper/command.rb, line 36 def options command.options end
run()
click to toggle source
# File lib/ecs_helper/command.rb, line 40 def run command.validate command.run end