Exception: Graphiti::Errors::UnsupportedOperator

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource, filter_name, supported, operator) ⇒ UnsupportedOperator

Returns a new instance of UnsupportedOperator.



121
122
123
124
125
126
# File 'lib/graphiti/errors.rb', line 121

def initialize(resource, filter_name, supported, operator)
  @resource = resource
  @filter_name = filter_name
  @supported = supported
  @operator = operator
end

Instance Attribute Details

#filter_nameObject (readonly)

Returns the value of attribute filter_name.



119
120
121
# File 'lib/graphiti/errors.rb', line 119

def filter_name
  @filter_name
end

#operatorObject (readonly)

Returns the value of attribute operator.



119
120
121
# File 'lib/graphiti/errors.rb', line 119

def operator
  @operator
end

#resourceObject (readonly)

Returns the value of attribute resource.



119
120
121
# File 'lib/graphiti/errors.rb', line 119

def resource
  @resource
end

#supportedObject (readonly)

Returns the value of attribute supported.



119
120
121
# File 'lib/graphiti/errors.rb', line 119

def supported
  @supported
end

Instance Method Details

#messageObject



128
129
130
131
132
# File 'lib/graphiti/errors.rb', line 128

def message
  <<~MSG
    #{@resource.class}: Tried to filter #{@filter_name.inspect} on operator #{@operator.inspect}, but not supported! Supported operators are #{@supported}.
  MSG
end