Class: Traxis::Responses::ResourceError

Inherits:
Resource
  • Object
show all
Defined in:
lib/traxis/responses.rb

Instance Method Summary collapse

Methods included from Traxis::Response::JSON

#encode!, #format!, #handle

Constructor Details

#initialize(errors: [], **args) ⇒ ResourceError

Returns a new instance of ResourceError.



51
52
53
54
# File 'lib/traxis/responses.rb', line 51

def initialize(errors:[], **args)
  @errors = errors
  super(**args)
end

Instance Method Details

#response_bodyObject



56
57
58
# File 'lib/traxis/responses.rb', line 56

def response_body
  super[:errors] = @errors
end