Class: Biju::Sms
- Inherits:
-
Object
- Object
- Biju::Sms
- Defined in:
- lib/biju/sms.rb
Instance Attribute Summary collapse
-
#datetime ⇒ Object
Returns the value of attribute datetime.
-
#id ⇒ Object
Returns the value of attribute id.
-
#message ⇒ Object
Returns the value of attribute message.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Sms
constructor
A new instance of Sms.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Sms
Returns a new instance of Sms.
5 6 7 8 9 |
# File 'lib/biju/sms.rb', line 5 def initialize(params={}) params.each do |attr, value| self.public_send("#{attr}=", value) end if params end |
Instance Attribute Details
#datetime ⇒ Object
Returns the value of attribute datetime.
3 4 5 |
# File 'lib/biju/sms.rb', line 3 def datetime @datetime end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/biju/sms.rb', line 3 def id @id end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/biju/sms.rb', line 3 def @message end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
3 4 5 |
# File 'lib/biju/sms.rb', line 3 def phone_number @phone_number end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/biju/sms.rb', line 15 def to_s "#{id} - #{phone_number} - #{datetime} - #{}" end |