Class: Vanguard::Rule::Guard::Evaluator
- Defined in:
- lib/vanguard/rule/guard.rb
Instance Attribute Summary
Attributes inherited from Evaluator
Instance Method Summary collapse
-
#valid? ⇒ true, false
private
Test if resource is valid.
Methods inherited from Evaluator
#initialize, #value, #violation, #violations
Constructor Details
This class inherits a constructor from Vanguard::Evaluator
Instance Method Details
#valid? ⇒ true, false
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.
Test if resource is valid
68 69 70 71 72 73 74 75 76 |
# File 'lib/vanguard/rule/guard.rb', line 68 def valid? resource = self.resource unless matcher.matches?(resource) return true end operand.evaluate(resource).valid? end |