Exception: Graphiti::Errors::MissingSideloadFilter

Inherits:
Base
  • Object
show all
Defined in:
lib/graphiti/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(resource_class, sideload, filter) ⇒ MissingSideloadFilter

Returns a new instance of MissingSideloadFilter.



656
657
658
659
660
# File 'lib/graphiti/errors.rb', line 656

def initialize(resource_class, sideload, filter)
  @resource_class = resource_class
  @sideload = sideload
  @filter = filter
end

Instance Method Details

#messageObject



662
663
664
665
666
667
668
# File 'lib/graphiti/errors.rb', line 662

def message
  <<~MSG
    #{@resource_class.name}: sideload #{@sideload.name.inspect} is associated with resource #{@sideload.resource.class.name}, but it does not have corresponding filter.

    Expecting filter #{@filter.inspect} on #{@sideload.resource.class.name}.
  MSG
end