Class: SMSApi::Response
- Inherits:
-
Object
- Object
- SMSApi::Response
- Defined in:
- lib/client_smsapi/response.rb,
lib/client_smsapi/response/error.rb,
lib/client_smsapi/response/regular.rb
Defined Under Namespace
Constant Summary collapse
- InvalidStatus =
Class.new(StandardError)
- ALLOWED_STATUSES =
[:ok, :error]
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status) ⇒ Response
Returns a new instance of Response.
12 13 14 15 |
# File 'lib/client_smsapi/response.rb', line 12 def initialize(status) fail InvalidStatus unless ALLOWED_STATUSES.include?(status) @status = status end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/client_smsapi/response.rb', line 8 def status @status end |