Class: Pipio::StatusMessage
- Defined in:
- lib/pipio/messages/status_message.rb
Overview
A message saying e.g. “Blahblah has gone away.”
Constant Summary collapse
- MAP =
{ /(.+) logged in\.$/ => 'online', /(.+) logged out\.$/ => 'offline', /(.+) has signed on\.$/ => 'online', /(.+) has signed off\.$/ => 'offline', /(.+) has gone away\.$/ => 'away', /(.+) is no longer away\.$/ => 'available', /(.+) has become idle\.$/ => 'idle', /(.+) is no longer idle\.$/ => 'available' }
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from Message
#sender_alias, #sender_screen_name, #time
Instance Method Summary collapse
-
#initialize(sender_screen_name, time, sender_alias, status) ⇒ StatusMessage
constructor
A new instance of StatusMessage.
- #to_s ⇒ Object
Constructor Details
#initialize(sender_screen_name, time, sender_alias, status) ⇒ StatusMessage
Returns a new instance of StatusMessage.
15 16 17 18 |
# File 'lib/pipio/messages/status_message.rb', line 15 def initialize(sender_screen_name, time, sender_alias, status) super(sender_screen_name, time, sender_alias) @status = status end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
20 21 22 |
# File 'lib/pipio/messages/status_message.rb', line 20 def status @status end |
Instance Method Details
#to_s ⇒ Object
22 23 24 |
# File 'lib/pipio/messages/status_message.rb', line 22 def to_s %(<status type="#{@status}" sender="#{@sender_screen_name}" time="#{adium_formatted_time}" alias="#{@sender_alias}"/>\n) end |