Class: Traxis::Responses::Unauthorized

Inherits:
Base
  • Object
show all
Includes:
Traxis::Response::Errors, Traxis::Response::JSON, Traxis::Response::Meta
Defined in:
lib/traxis/responses.rb

Instance Method Summary collapse

Methods included from Traxis::Response::JSON

#encode!, #handle, #initialize

Instance Method Details

#format!Object



25
26
27
28
# File 'lib/traxis/responses.rb', line 25

def format!
  @body = response_body
  @body
end

#response_bodyObject



19
20
21
22
23
# File 'lib/traxis/responses.rb', line 19

def response_body
  @response_body = super
  @response_body[:meta][:errors] << "You are not authorized to do that!"
  @response_body
end