Class: Biju::Sms

Inherits:
Object
  • Object
show all
Defined in:
lib/biju/sms.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#datetimeObject

Returns the value of attribute datetime.



3
4
5
# File 'lib/biju/sms.rb', line 3

def datetime
  @datetime
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/biju/sms.rb', line 3

def id
  @id
end

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/biju/sms.rb', line 3

def message
  @message
end

#phone_numberObject

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_sObject



15
16
17
# File 'lib/biju/sms.rb', line 15

def to_s
  "#{id} - #{phone_number} - #{datetime} - #{message}"
end