Class: Xrc::Elements::Message

Inherits:
REXML::Element
  • Object
show all
Defined in:
lib/xrc/elements/message.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Message

Returns a new instance of Message.



4
5
6
7
8
9
10
11
# File 'lib/xrc/elements/message.rb', line 4

def initialize(options = {})
  super("message")
  attributes["from"] = options[:from]
  attributes["to"] = options[:to]
  attributes["type"] = options[:type]
  body.text = options[:body]
  add(body)
end