Exception: Graphiti::Errors::SingularFilter

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

Instance Method Summary collapse

Constructor Details

#initialize(resource, filter, value) ⇒ SingularFilter

Returns a new instance of SingularFilter.



228
229
230
231
232
# File 'lib/graphiti/errors.rb', line 228

def initialize(resource, filter, value)
  @resource = resource
  @filter = filter
  @value = value
end

Instance Method Details

#messageObject



234
235
236
237
238
239
240
# File 'lib/graphiti/errors.rb', line 234

def message
  <<-MSG
    #{@resource.class.name}: passed multiple values to filter #{@filter.keys[0].inspect}, which was marked single: true.

    Value was: #{@value.inspect}
  MSG
end