Class: JSCommander::Message
- Inherits:
-
Object
- Object
- JSCommander::Message
- Defined in:
- lib/jscmd/message.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#body ⇒ Object
Returns the value of attribute body.
Instance Method Summary collapse
-
#initialize(body = nil, attributes = {}) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(body = nil, attributes = {}) ⇒ Message
Returns a new instance of Message.
35 36 37 38 39 40 41 |
# File 'lib/jscmd/message.rb', line 35 def initialize(body = nil, attributes = {}) @body = body @attributes = {} attributes.each do |key, value| @attributes[key.to_s] = value end end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
33 34 35 |
# File 'lib/jscmd/message.rb', line 33 def attributes @attributes end |
#body ⇒ Object
Returns the value of attribute body.
33 34 35 |
# File 'lib/jscmd/message.rb', line 33 def body @body end |