Class: Meshchat::Ui::Command::Chat
- Defined in:
- lib/meshchat/ui/command/chat.rb
Constant Summary
Constants inherited from Base
Base::ADD, Base::ALL_CHAT_LOCK, Base::BIND, Base::CHAT, Base::CONFIG, Base::DISPLAY, Base::EMOTE, Base::EXIT, Base::EXPORT, Base::HELP, Base::IDENTITY, Base::IMPORT, Base::IRB, Base::OFFLINE, Base::ONLINE, Base::PING, Base::PING_ALL, Base::QUIT, Base::REMOVE, Base::RM, Base::ROLL, Base::SEND_DISCONNECT, Base::SERVER, Base::SERVERS, Base::SET, Base::SHARE, Base::WHISPER_LOCK, Base::WHO
Instance Attribute Summary
Attributes inherited from Base
#_input, #_input_factory, #_message_dispatcher, #_message_factory
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Meshchat::Ui::Command::Base
Instance Method Details
#handle ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/meshchat/ui/command/chat.rb', line 6 def handle servers = Node.online if !servers.empty? type = self.class.name.demodulize.downcase m = .create(type, data: { message: _input }) show_myself(m) servers.each do |entry| .(node: entry, message: m) end else Display.warning 'you have no servers' end end |