Exception: Dry::Ability::RuleNotDefined
- Defined in:
- lib/dry/ability/exceptions.rb
Constant Summary collapse
- DEFAULT_MESSAGE_TEMPLATE =
"Rule for subject: %p, action: %p is not defined (candidates: %p)"
- NONE =
[].freeze
Instance Method Summary collapse
-
#initialize(message = nil, subject:, action:, candidates: NONE) ⇒ RuleNotDefined
constructor
A new instance of RuleNotDefined.
Constructor Details
#initialize(message = nil, subject:, action:, candidates: NONE) ⇒ RuleNotDefined
Returns a new instance of RuleNotDefined.
15 16 17 18 19 |
# File 'lib/dry/ability/exceptions.rb', line 15 def initialize( = nil, subject:, action:, candidates: NONE) @action, @subject = action, subject ||= format(DEFAULT_MESSAGE_TEMPLATE, subject.class, action, candidates) super() end |