Exception: Placet::Denied
Overview
authorize! が拒否されたときに送出される。decision に根拠が入る
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#decision ⇒ Object
readonly
Returns the value of attribute decision.
Instance Method Summary collapse
-
#initialize(action, decision) ⇒ Denied
constructor
A new instance of Denied.
Constructor Details
#initialize(action, decision) ⇒ Denied
Returns a new instance of Denied.
13 14 15 16 17 |
# File 'lib/placet/errors.rb', line 13 def initialize(action, decision) @action = action @decision = decision super("denied: #{action} (#{decision.basis})") end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
11 12 13 |
# File 'lib/placet/errors.rb', line 11 def action @action end |
#decision ⇒ Object (readonly)
Returns the value of attribute decision.
11 12 13 |
# File 'lib/placet/errors.rb', line 11 def decision @decision end |