Class: BotMob::Command
- Inherits:
-
Object
- Object
- BotMob::Command
- Defined in:
- lib/bot_mob/command.rb
Overview
# BotMob::Command
This class handles all the mob command line interactions
Instance Method Summary collapse
- #handle(argv) ⇒ Object
-
#initialize ⇒ Command
constructor
A new instance of Command.
Constructor Details
#initialize ⇒ Command
Returns a new instance of Command.
8 9 10 |
# File 'lib/bot_mob/command.rb', line 8 def initialize # parse_options! end |
Instance Method Details
#handle(argv) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/bot_mob/command.rb', line 12 def handle(argv) case argv[0].to_s.to_sym when :server then BotMob::Server.run!( || {}) when :console then system("#{__dir__}/../../bin/console") else puts 'Usage: mob server [options]' end end |