Exception: Graphiti::Errors::ResourceEndpointConflict

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

Instance Method Summary collapse

Constructor Details

#initialize(path, action, resource_a, resource_b) ⇒ ResourceEndpointConflict

Returns a new instance of ResourceEndpointConflict.



424
425
426
427
428
429
# File 'lib/graphiti/errors.rb', line 424

def initialize(path, action, resource_a, resource_b)
  @path = path
  @action = action
  @resource_a = resource_a
  @resource_b = resource_b
end

Instance Method Details

#messageObject



431
432
433
434
435
436
437
# File 'lib/graphiti/errors.rb', line 431

def message
  <<~MSG
    Both '#{@resource_a}' and '#{@resource_b}' are associated to endpoint #{@path}##{@action}!

    Only one resource can be associated to a given url/verb combination.
  MSG
end