Exception: JSONAPI::Realizer::Error::InvalidAcceptTypeHeader

Inherits:
JSONAPI::Realizer::Error show all
Defined in:
lib/jsonapi/realizer/error/invalid_accept_type_header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#givenObject

Returns the value of attribute given.



8
9
10
# File 'lib/jsonapi/realizer/error/invalid_accept_type_header.rb', line 8

def given
  @given
end

#keyObject

Returns the value of attribute key.



7
8
9
# File 'lib/jsonapi/realizer/error/invalid_accept_type_header.rb', line 7

def key
  @key
end

#wantedObject

Returns the value of attribute wanted.



9
10
11
# File 'lib/jsonapi/realizer/error/invalid_accept_type_header.rb', line 9

def wanted
  @wanted
end

Instance Method Details

#messageObject



11
12
13
# File 'lib/jsonapi/realizer/error/invalid_accept_type_header.rb', line 11

def message
  "HTTP #{key} Header recieved is #{given}, but expected #{wanted}"
end