Class: DebugCommand
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
#after_init, #before_init, default_cmd, describe, description, get_allowed_commands, #help, #initialize, load, load_all, #run, show_use, usage
Constructor Details
This class inherits a constructor from Command
Instance Method Details
#main ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/commands/debug.rb', line 6 def main allowed_commands = ['console'] if @params[:args].size == 0 default_debug elsif @params[:args].size == 1 && allowed_commands.include?( @params[:args][0] ) send( "console_debug" ) else puts "ERROR: Invalid command" end end |