Exception: Insika::PolicyDenied
- Defined in:
- lib/insika/errors.rb
Overview
Policy Engine denied -> :policy_denied event, task :failed
Instance Attribute Summary collapse
-
#policy ⇒ Object
readonly
Returns the value of attribute policy.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(message = nil, policy: nil, reason: nil) ⇒ PolicyDenied
constructor
A new instance of PolicyDenied.
Constructor Details
#initialize(message = nil, policy: nil, reason: nil) ⇒ PolicyDenied
Returns a new instance of PolicyDenied.
16 17 18 19 20 |
# File 'lib/insika/errors.rb', line 16 def initialize( = nil, policy: nil, reason: nil) @policy = policy @reason = reason super( || "policy #{policy} denied: #{reason}") end |
Instance Attribute Details
#policy ⇒ Object (readonly)
Returns the value of attribute policy.
14 15 16 |
# File 'lib/insika/errors.rb', line 14 def policy @policy end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
14 15 16 |
# File 'lib/insika/errors.rb', line 14 def reason @reason end |