Class: Campfire::TextMessage
Overview
TextMessage - normal user text message
#command - if the message is addressed to the bot ("<bot name>, ..." or "..., <bot name>"), the
the part of the body minus the bot name (and comma) is returned by #command
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
Attributes inherited from Message
#body, #message_id, #person, #person_full_name, #timestamp, #type, #user
Instance Method Summary collapse
Methods inherited from Message
Constructor Details
This class inherits a constructor from Campfire::Message
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
32 33 34 |
# File 'lib/campfire/message.rb', line 32 def command @command end |
Instance Method Details
#addressed_to_me? ⇒ Boolean
34 35 36 |
# File 'lib/campfire/message.rb', line 34 def addressed_to_me? not command.nil? end |