Exception: ActionPolicy::NonPredicateRule

Inherits:
UnknownRule show all
Defined in:
lib/action_policy/policy/core.rb

Instance Attribute Summary

Attributes inherited from UnknownRule

#message, #policy, #rule

Instance Method Summary collapse

Methods included from SuggestMessage

#suggest

Constructor Details

#initialize(policy, rule) ⇒ NonPredicateRule

Returns a new instance of NonPredicateRule.



32
33
34
35
36
# File 'lib/action_policy/policy/core.rb', line 32

def initialize(policy, rule)
  @policy = policy.class
  @rule = rule
  @message = "The rule '#{@rule}' of '#{@policy}' must ends with ? (question mark)\nDid you mean? #{@rule}?"
end