class ZabconExecuteCommand
Attributes
help[R]
options[R]
show_params[R]
Public Class Methods
new(cmd_obj)
click to toggle source
Configure the command item Also perform the necessary argument processing at this step.
# File libs/command_tree.rb, line 66 def initialize(cmd_obj) raise "cmd_obj must be fo type CommandList::Cmd" if cmd_obj.class!=CommandList::Cmd @results=nil @proc=cmd_obj.command_obj.method(:execute) @command_obj=cmd_obj.command_obj begin arg_result=@command_obj.call_tokenizer(cmd_obj.parameters) arg_result=@command_obj.call_arg_processor(arg_result) #TODO Fix showing help messages #rescue ParameterError => e # e.help_func=cmd_obj.command_obj.help_method # raise e end @cmd_params=arg_result.cmd_params @show_params=arg_result.show_params @printing=cmd_obj.command_obj.print? @command_name=cmd_obj.command_obj.command_name # @help=cmd_obj.help # @options=options end
Public Instance Methods
execute()
click to toggle source
# File libs/command_tree.rb, line 94 def execute @results=@command_obj.execute(@cmd_params) end
print?()
click to toggle source
# File libs/command_tree.rb, line 90 def print? @printing==true end