Class: SMSApi::Response::Error
- Inherits:
-
SMSApi::Response
- Object
- SMSApi::Response
- SMSApi::Response::Error
- Defined in:
- lib/client_smsapi/response/error.rb
Constant Summary collapse
- MESSAGES =
YAML.load_file('lib/client_smsapi/error/messages.yml')['error'].freeze
Constants inherited from SMSApi::Response
ALLOWED_STATUSES, InvalidStatus
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Attributes inherited from SMSApi::Response
Instance Method Summary collapse
- #exception ⇒ Object
-
#initialize(code = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/client_smsapi/response/error.rb', line 6 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/client_smsapi/response/error.rb', line 6 def @message end |
Instance Method Details
#exception ⇒ Object
15 16 17 |
# File 'lib/client_smsapi/response/error.rb', line 15 def exception StandardError.new("[CODE: #{code}] #{}") end |