Class: Meshchat::Ui::Command::Emote

Inherits:
Chat
  • Object
show all
Defined in:
lib/meshchat/ui/command/emote.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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Chat

#handle

Methods inherited from Base

#handle

Constructor Details

#initialize(input, message_dispatcher, message_factory, input_factory) ⇒ Emote

Returns a new instance of Emote.



10
11
12
13
14
15
# File 'lib/meshchat/ui/command/emote.rb', line 10

def initialize(input, message_dispatcher, message_factory, input_factory)
  super
  input = input.chomp
  emote_message = input.gsub(/\A\/me /, '').chomp
  @_input = emote_message
end

Class Method Details

.descriptionObject



6
7
8
# File 'lib/meshchat/ui/command/emote.rb', line 6

def self.description
  'send an emote to the current chat'
end

Instance Method Details

#show_myself(message) ⇒ Object



17
18
19
# File 'lib/meshchat/ui/command/emote.rb', line 17

def show_myself(message)
  Display.emote message.display
end