Class: Attestor::Validations::Follower Private
- Defined in:
- lib/attestor/validations/follower.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Describe a policy follower for class instances
The follower not only calls an instance method (as validator does), but checks whether the result is valid and raises an exception otherwise.
Instance Method Summary collapse
-
#validate(object) ⇒ undefined
private
Validates a policy.
Methods inherited from Validator
==, initialize, new, used_in_context?, validate
Instance Method Details
#validate(object) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Validates a policy
25 26 27 28 29 |
# File 'lib/attestor/validations/follower.rb', line 25 def validate(object) policy = super(object) return if policy.valid? object.__send__ :invalid, name end |