Class: Xrc::Messages::Message
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#body ⇒ String
Returns the message body with unescaping HTML.
-
#to_hash ⇒ Hash
Returns this message in Hash format.
Methods inherited from Base
#delayed?, #from, #initialize, #to, #type
Constructor Details
This class inherits a constructor from Xrc::Messages::Base
Instance Method Details
#body ⇒ String
Returns the message body with unescaping HTML.
8 9 10 |
# File 'lib/xrc/messages/message.rb', line 8 def body CGI.unescape_html(@element.elements["body/text()"].to_s) end |
#to_hash ⇒ Hash
Returns this message in Hash format
20 21 22 23 24 25 26 |
# File 'lib/xrc/messages/message.rb', line 20 def to_hash { body: body, from: from, to: to, } end |