Class: EventMachine::Kannel::Message
- Inherits:
-
Object
- Object
- EventMachine::Kannel::Message
- Includes:
- Validations
- Defined in:
- lib/em-kannel/message.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
- #as_query ⇒ Object
-
#initialize(attributes = {}) ⇒ Message
constructor
A new instance of Message.
Methods included from Validations
#friendly_name, included, #validate!
Constructor Details
#initialize(attributes = {}) ⇒ Message
Returns a new instance of Message.
12 13 14 15 16 17 18 |
# File 'lib/em-kannel/message.rb', line 12 def initialize(attributes={}) attributes = attributes.with_indifferent_access self.from = attributes[:from] self.to = attributes[:to] self.body = attributes[:body] end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
6 7 8 |
# File 'lib/em-kannel/message.rb', line 6 def body @body end |
#from ⇒ Object
Returns the value of attribute from.
6 7 8 |
# File 'lib/em-kannel/message.rb', line 6 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
6 7 8 |
# File 'lib/em-kannel/message.rb', line 6 def to @to end |
Instance Method Details
#as_query ⇒ Object
20 21 22 |
# File 'lib/em-kannel/message.rb', line 20 def as_query { from: from, to: to, text: body } end |