Exception: Forward::Api::ResourceError
- Inherits:
-
StandardError
- Object
- StandardError
- Forward::Api::ResourceError
- Defined in:
- lib/forward/api.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#api_message ⇒ Object
readonly
Returns the value of attribute api_message.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(code, action, json = {}) ⇒ ResourceError
constructor
A new instance of ResourceError.
Constructor Details
#initialize(code, action, json = {}) ⇒ ResourceError
Returns a new instance of ResourceError.
14 15 16 17 18 19 20 21 |
# File 'lib/forward/api.rb', line 14 def initialize(code, action, json = {}) @code = code @action = action @json = json @type = json[:type] @api_message = json[:message] @errors = json[:errors] || {} end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
12 13 14 |
# File 'lib/forward/api.rb', line 12 def action @action end |
#api_message ⇒ Object (readonly)
Returns the value of attribute api_message.
12 13 14 |
# File 'lib/forward/api.rb', line 12 def @api_message end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
12 13 14 |
# File 'lib/forward/api.rb', line 12 def code @code end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
12 13 14 |
# File 'lib/forward/api.rb', line 12 def errors @errors end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
12 13 14 |
# File 'lib/forward/api.rb', line 12 def type @type end |