Class: Attestor::Policy::Node Private
- Inherits:
-
Object
- Object
- Attestor::Policy::Node
- Includes:
- Attestor::Policy
- Defined in:
- lib/attestor/policy/node.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.
The base class for composite policies
Class Attribute Summary collapse
-
.branches ⇒ Array<Policy::Base>
readonly
private
The branches of the node.
Class Method Summary collapse
- .initialize(*branches) ⇒ Object private
-
.new(*branches) ⇒ Policy::Base::Node
Creates the node with branches.
-
.validate ⇒ undefined
private
Validates the policy as invalid.
Methods included from Attestor::Policy
#and, included, #invalid?, #not, #or, #valid?, #xor
Methods included from Validations::ClassMethods
#follow_policy, #follow_validator, #validate, #validators
Methods included from Factory
Methods included from Validations
Class Attribute Details
.branches ⇒ Array<Policy::Base> (readonly)
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.
The branches of the node
31 32 33 |
# File 'lib/attestor/policy/node.rb', line 31 def branches @branches end |
Class Method Details
.initialize(*branches) ⇒ 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.
22 23 24 25 |
# File 'lib/attestor/policy/node.rb', line 22 def initialize(*branches) @branches = branches.flatten freeze end |
.new(*branches) ⇒ Policy::Base::Node
Creates the node with branches
|
|
# File 'lib/attestor/policy/node.rb', line 13
|
.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.
Validates the policy as invalid
To be reloaded by subclasses (And, Or, Xor, Not)
40 41 42 |
# File 'lib/attestor/policy/node.rb', line 40 def validate invalid :base end |