Exception: Sand::NotAuthorizedError

Inherits:
Error
  • Object
show all
Defined in:
lib/sand.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ NotAuthorizedError

Returns a new instance of NotAuthorizedError.



16
17
18
19
20
21
22
# File 'lib/sand.rb', line 16

def initialize(options)
  @record = options[:record]
  @query = options[:query]
  @policy = options[:policy]

  super("not allowed to #{query} this #{record.inspect}")
end

Instance Attribute Details

#policyObject (readonly)

Returns the value of attribute policy.



14
15
16
# File 'lib/sand.rb', line 14

def policy
  @policy
end

#queryObject (readonly)

Returns the value of attribute query.



14
15
16
# File 'lib/sand.rb', line 14

def query
  @query
end

#recordObject (readonly)

Returns the value of attribute record.



14
15
16
# File 'lib/sand.rb', line 14

def record
  @record
end