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.
351 352 353 354 |
# File 'lib/graphiti/errors.rb', line 351 def initialize(resource, name, flag, **opts) super @guard = opts[:guard] end |
Instance Method Details
#message ⇒ Object
356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/graphiti/errors.rb', line 356 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 |