Class: Policy::Base::And Private
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.
Composition of two policies
The policy is valid if both its parts are valid. #valid? method picks errors from its parts in case any is invalid.
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#valid? ⇒ Boolean
private
Checks whether every policy is valid.
Methods inherited from Node
Methods included from Policy::Base
Instance Method Details
#valid? ⇒ Boolean
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.
Checks whether every policy is valid
Mutates the policy by adding #errors from its invalid part.
30 31 32 |
# File 'lib/policy/base/and.rb', line 30 def valid? super { return true unless any_invalid? } end |