Class: Pipio::XMLMessage
- Defined in:
- lib/pipio/messages/xml_message.rb
Overview
Basic message with body text (as opposed to pure status messages, which have no body).
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Attributes inherited from Message
#sender_alias, #sender_screen_name, #time
Instance Method Summary collapse
-
#initialize(sender_screen_name, time, sender_alias, body) ⇒ XMLMessage
constructor
A new instance of XMLMessage.
- #to_s ⇒ Object
Constructor Details
#initialize(sender_screen_name, time, sender_alias, body) ⇒ XMLMessage
Returns a new instance of XMLMessage.
5 6 7 8 9 |
# File 'lib/pipio/messages/xml_message.rb', line 5 def initialize(sender_screen_name, time, sender_alias, body) super(sender_screen_name, time, sender_alias) @body = normalize(body) @styled_body = %(<div><span style="font-family: Helvetica; font-size: 12pt;">#{@body}</span></div>) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
11 12 13 |
# File 'lib/pipio/messages/xml_message.rb', line 11 def body @body end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/pipio/messages/xml_message.rb', line 13 def to_s %(<message sender="#{@sender_screen_name}" time="#{adium_formatted_time}" alias="#{@sender_alias}">#{@styled_body}</message>) end |