Exception: JSONAPI::Serializer::UnsupportedIncludeError

Inherits:
Error
  • Object
show all
Defined in:
lib/jsonapi/serializer/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(include_item, klass) ⇒ UnsupportedIncludeError

Returns a new instance of UnsupportedIncludeError.



10
11
12
13
14
# File 'lib/jsonapi/serializer/errors.rb', line 10

def initialize(include_item, klass)
  super()
  @include_item = include_item
  @klass = klass
end

Instance Attribute Details

#include_itemObject (readonly)

Returns the value of attribute include_item.



8
9
10
# File 'lib/jsonapi/serializer/errors.rb', line 8

def include_item
  @include_item
end

#klassObject (readonly)

Returns the value of attribute klass.



8
9
10
# File 'lib/jsonapi/serializer/errors.rb', line 8

def klass
  @klass
end

Instance Method Details

#messageObject



16
17
18
# File 'lib/jsonapi/serializer/errors.rb', line 16

def message
  "#{include_item} is not specified as a relationship on #{klass}"
end