Exception: Graphiti::Errors::InvalidAttributeAccess
- Inherits:
-
AttributeError
- Object
- StandardError
- Base
- AttributeError
- Graphiti::Errors::InvalidAttributeAccess
- Defined in:
- lib/graphiti/errors.rb
Instance Attribute Summary
Attributes inherited from AttributeError
#exists, #flag, #guard, #name, #request, #resource
Instance Method Summary collapse
-
#initialize(resource, name, flag, **opts) ⇒ InvalidAttributeAccess
constructor
A new instance of InvalidAttributeAccess.
- #message ⇒ Object
Methods inherited from AttributeError
Constructor Details
#initialize(resource, name, flag, **opts) ⇒ InvalidAttributeAccess
Returns a new instance of InvalidAttributeAccess.
376 377 378 379 |
# File 'lib/graphiti/errors.rb', line 376 def initialize(resource, name, flag, **opts) super @guard = opts[:guard] end |
Instance Method Details
#message ⇒ Object
381 382 383 384 385 386 387 388 389 390 391 |
# File 'lib/graphiti/errors.rb', line 381 def msg = super msg << if @guard ", but the guard #{@guard.inspect} did not pass." else ", but the attribute was marked #{@flag.inspect} => false." end msg end |