class Graphiti::Errors::InvalidAttributeAccess

Public Class Methods

new(resource, name, flag, **opts) click to toggle source
Calls superclass method Graphiti::Errors::AttributeError::new
# File lib/graphiti/errors.rb, line 376
def initialize(resource, name, flag, **opts)
  super
  @guard = opts[:guard]
end

Public Instance Methods

message() click to toggle source
# File lib/graphiti/errors.rb, line 381
def message
  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