Class: Attestor::Policy::Not 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.
Negation of a single policy
The policy is valid if its only branch is invalid
Instance Attribute Summary
Attributes included from Attestor::Policy
Class Method Summary collapse
- .initialize(_) ⇒ Object private
-
.new(policy) ⇒ Policy::Base::Node
Creates the policy negation.
-
.validate ⇒ undefined
private
Checks whether every policy is valid.
Methods included from Attestor::Policy
#and, included, #invalid?, #not, #or, #valid?, #xor
Methods included from Validations::ClassMethods
#follow_policy, #validate, #validators
Methods included from Factory
Methods included from Validations
Class Method Details
.initialize(_) ⇒ Object
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.
25 26 27 |
# File 'lib/attestor/policy/not.rb', line 25 def initialize(_) super end |
.new(policy) ⇒ Policy::Base::Node
Creates the policy negation
|
|
# File 'lib/attestor/policy/not.rb', line 16
|
.validate ⇒ 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.
Checks whether every policy is valid
39 40 41 42 |
# File 'lib/attestor/policy/not.rb', line 39 def validate return unless any_valid? super end |