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.



102
103
104
105
106
107
# File 'lib/graphiti/errors.rb', line 102

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.



100
101
102
# File 'lib/graphiti/errors.rb', line 100

def filter_name
  @filter_name
end

#operatorObject (readonly)

Returns the value of attribute operator.



100
101
102
# File 'lib/graphiti/errors.rb', line 100

def operator
  @operator
end

#resourceObject (readonly)

Returns the value of attribute resource.



100
101
102
# File 'lib/graphiti/errors.rb', line 100

def resource
  @resource
end

#supportedObject (readonly)

Returns the value of attribute supported.



100
101
102
# File 'lib/graphiti/errors.rb', line 100

def supported
  @supported
end

Instance Method Details

#messageObject



109
110
111
112
113
# File 'lib/graphiti/errors.rb', line 109

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