Class: AQL::SMSResponse
- Inherits:
-
Object
- Object
- AQL::SMSResponse
- Defined in:
- lib/aql_sms_api.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#credits ⇒ Object
readonly
Returns the value of attribute credits.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(res) ⇒ SMSResponse
constructor
A new instance of SMSResponse.
Constructor Details
#initialize(res) ⇒ SMSResponse
Returns a new instance of SMSResponse.
41 42 43 44 45 46 |
# File 'lib/aql_sms_api.rb', line 41 def initialize(res) parts = res.match(/^([0-9]):(\d+)\s(.+)$/) @code = parts[1] @credits = parts[2] @message = parts[3].strip end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
39 40 41 |
# File 'lib/aql_sms_api.rb', line 39 def code @code end |
#credits ⇒ Object (readonly)
Returns the value of attribute credits.
39 40 41 |
# File 'lib/aql_sms_api.rb', line 39 def credits @credits end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
39 40 41 |
# File 'lib/aql_sms_api.rb', line 39 def @message end |