Class: MeshChat::Command::Base
- Inherits:
-
MeshChat::CLI::Input
- Object
- MeshChat::CLI::Input
- MeshChat::Command::Base
- Defined in:
- lib/meshchat/command/base.rb
Direct Known Subclasses
Config, Exit, IRB, Identity, Import, Init, Listen, Ping, PingAll, Server, Share, StopListening, Whisper, Who
Constant Summary collapse
- SET =
Commands
'set'- CONFIG =
'config'- DISPLAY =
'display'- EXIT =
'exit'- QUIT =
'quit'- LISTEN =
'listen'- STOP_LISTENING =
'stoplistening'- CONNECT =
'connect'- CHAT =
'chat'- ADD =
'add'- REMOVE =
'remove'- RM =
'rm'- SERVERS =
'servers'- SERVER =
'server'- WHO =
'who'- PING =
'ping'- PING_ALL =
'pingall'- IDENTITY =
'identity'- IRB =
'c'- INIT =
'init'- SHARE =
'share'- IMPORT =
'import'- EXPORT =
'export'
Constants inherited from MeshChat::CLI::Input
MeshChat::CLI::Input::COMMAND, MeshChat::CLI::Input::WHISPER
Instance Attribute Summary collapse
-
#_input ⇒ Object
Returns the value of attribute _input.
Instance Method Summary collapse
Methods inherited from MeshChat::CLI::Input
create, #initialize, is_command?, is_whisper?
Constructor Details
This class inherits a constructor from MeshChat::CLI::Input
Instance Attribute Details
#_input ⇒ Object
Returns the value of attribute _input.
4 5 6 |
# File 'lib/meshchat/command/base.rb', line 4 def _input @_input end |
Instance Method Details
#handle ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/meshchat/command/base.rb', line 31 def handle klass = CLI::COMMAND_MAP[command] if klass klass.new(_input).handle else Display.alert 'not implemented...' end end |