Class: Pidgin2Adium::Event
- Inherits:
-
XMLMessage
- Object
- Message
- XMLMessage
- Pidgin2Adium::Event
- Defined in:
- lib/pidgin2adium/messages/event.rb
Overview
Pidgin does not have Events, but Adium does. Pidgin mostly uses system messages to display what Adium calls events. These include sending a file, starting a Direct IM connection, or an error in chat.
Instance Attribute Summary collapse
-
#event_type ⇒ Object
Returns the value of attribute event_type.
Attributes inherited from XMLMessage
Attributes inherited from Message
Instance Method Summary collapse
-
#initialize(sender, time, buddy_alias, body, event_type) ⇒ Event
constructor
A new instance of Event.
- #to_s ⇒ Object
Methods inherited from XMLMessage
#normalize_body!, #normalize_body_entities!
Methods inherited from Message
Constructor Details
#initialize(sender, time, buddy_alias, body, event_type) ⇒ Event
6 7 8 9 |
# File 'lib/pidgin2adium/messages/event.rb', line 6 def initialize(sender, time, buddy_alias, body, event_type) super(sender, time, buddy_alias, body) @event_type = event_type end |
Instance Attribute Details
#event_type ⇒ Object
Returns the value of attribute event_type.
10 11 12 |
# File 'lib/pidgin2adium/messages/event.rb', line 10 def event_type @event_type end |
Instance Method Details
#to_s ⇒ Object
12 13 14 15 |
# File 'lib/pidgin2adium/messages/event.rb', line 12 def to_s return sprintf('<event type="%s" sender="%s" time="%s" alias="%s">%s</event>', @event_type, @sender, @time, @buddy_alias, @styled_body) end |