Class: Campfire::TextMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/campfire/message.rb

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

Attributes inherited from Message

#body, #message_id, #person, #person_full_name, #timestamp, #type, #user

Instance Method Summary collapse

Methods inherited from Message

#initialize

Constructor Details

This class inherits a constructor from Campfire::Message

Instance Attribute Details

#commandObject

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

Returns:

  • (Boolean)


34
35
36
# File 'lib/campfire/message.rb', line 34

def addressed_to_me?
  not command.nil?
end