Sha256: 17bb81a524566364bd5233e7f12d0d736575f4fd862d163749bfd12c9ff41ee5
Contents?: true
Size: 768 Bytes
Versions: 2
Compression:
Stored size: 768 Bytes
Contents
# encoding: utf-8 module Attestor module Policy # XOR-concatenation of several policies (branches) # # The policy is valid when it has both valid and invalid branches. # # @example (see #validate) # # @api private class Xor < Node # Checks whether both valid and invalid branches are present # # @example # first.valid? # => true # second.valid? # => true # # composition = Attestor::Policy::Xor.new(first, second) # composition.validate # # => Policy::InvalidError # # @return [undefined] def validate return if detect(&:valid?) && detect(&:invalid?) super end end # class Xor end # module Base end # module Policy
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
attestor-1.0.0 | lib/attestor/policy/xor.rb |
attestor-0.4.0 | lib/attestor/policy/xor.rb |