Exception: Graphiti::Errors::MissingDependentFilter

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

Instance Method Summary collapse

Constructor Details

#initialize(resource, filters) ⇒ MissingDependentFilter

Returns a new instance of MissingDependentFilter.



672
673
674
675
# File 'lib/graphiti/errors.rb', line 672

def initialize(resource, filters)
  @resource = resource
  @filters = filters
end

Instance Method Details

#messageObject



677
678
679
680
681
682
683
# File 'lib/graphiti/errors.rb', line 677

def message
  msg = "#{@resource.class.name}: The following filters had dependencies that were not passed:"
  @filters.each do |f|
    msg << "\n#{f[:filter][:name].inspect} - dependent on #{f[:filter][:dependencies].inspect}, but #{f[:missing].inspect} not passed."
  end
  msg
end