Exception: Forward::Api::ResourceError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/forward/api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject (readonly)

Returns the value of attribute action.



12
13
14
# File 'lib/forward/api.rb', line 12

def action
  @action
end

#api_messageObject (readonly)

Returns the value of attribute api_message.



12
13
14
# File 'lib/forward/api.rb', line 12

def api_message
  @api_message
end

#codeObject (readonly)

Returns the value of attribute code.



12
13
14
# File 'lib/forward/api.rb', line 12

def code
  @code
end

#errorsObject (readonly)

Returns the value of attribute errors.



12
13
14
# File 'lib/forward/api.rb', line 12

def errors
  @errors
end

#typeObject (readonly)

Returns the value of attribute type.



12
13
14
# File 'lib/forward/api.rb', line 12

def type
  @type
end