Class: Smsapi::BulkSMS
- Inherits:
-
Object
- Object
- Smsapi::BulkSMS
- Includes:
- Defaults
- Defined in:
- lib/smsapi/bulk_sms.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#sent ⇒ Object
readonly
Returns the value of attribute sent.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
Instance Method Summary collapse
- #deliver ⇒ Object
-
#initialize(to, message, server, options = {}) ⇒ BulkSMS
constructor
A new instance of BulkSMS.
Methods included from Defaults
Constructor Details
#initialize(to, message, server, options = {}) ⇒ BulkSMS
Returns a new instance of BulkSMS.
6 7 8 9 10 11 12 |
# File 'lib/smsapi/bulk_sms.rb', line 6 def initialize(to, , server, = {}) @options = .merge @to = to @message = @server = server @sent = [] end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/smsapi/bulk_sms.rb', line 5 def @message end |
#sent ⇒ Object (readonly)
Returns the value of attribute sent.
5 6 7 |
# File 'lib/smsapi/bulk_sms.rb', line 5 def sent @sent end |
#to ⇒ Object (readonly)
Returns the value of attribute to.
5 6 7 |
# File 'lib/smsapi/bulk_sms.rb', line 5 def to @to end |
Instance Method Details
#deliver ⇒ Object
14 15 16 17 |
# File 'lib/smsapi/bulk_sms.rb', line 14 def deliver read_response @server.sms(server_params) self end |