Class: MeshChat::CLI::Server
- Defined in:
- lib/meshchat/cli/server.rb
Constant Summary collapse
- ONLINE =
'online'
Constants inherited from Command
Command::ADD, Command::CHAT, Command::CONFIG, Command::CONNECT, Command::DISPLAY, Command::EXIT, Command::EXPORT, Command::IDENTITY, Command::IMPORT, Command::INIT, Command::IRB, Command::LISTEN, Command::PING, Command::PING_ALL, Command::QUIT, Command::REMOVE, Command::RM, Command::SERVER, Command::SERVERS, Command::SET, Command::SHARE, Command::STOP_LISTENING, Command::WHO
Constants inherited from Input
Input::COMMAND, Input::WHISPER
Instance Attribute Summary
Attributes inherited from Command
Attributes inherited from Input
Instance Method Summary collapse
Methods inherited from Input
create, #initialize, is_command, is_whisper?
Constructor Details
This class inherits a constructor from MeshChat::CLI::Input
Instance Method Details
#handle ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/meshchat/cli/server.rb', line 6 def handle case sub_command when ONLINE Display.info Node.online.map(&:as_info).join(', ') || 'no one is online' else Display.info Node.all.map(&:as_info).join(', ') || 'there are no nodes' end end |