Sha256: 6136639a03623ff67606bef94cf51ffc9bc13b5022f6d123c671d19b15598dd6

Contents?: true

Size: 506 Bytes

Versions: 8

Compression:

Stored size: 506 Bytes

Contents

module Alf
  class Predicate
    module And
      include NadicBool

      def operator_symbol
        :'&&'
      end

      def and_split(attr_list)
        sexpr_body.inject([tautology, tautology]) do |(top,down),term|
          pair = term.and_split(attr_list)
          [top & pair.first, down & pair.last]
        end
      end

      def constant_variables
        sexpr_body.inject(AttrList::EMPTY) do |cvars,expr|
          cvars | expr.constant_variables
        end
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
alf-core-0.16.3 lib/alf/predicate/nodes/and.rb
alf-core-0.16.2 lib/alf/predicate/nodes/and.rb
alf-core-0.16.1 lib/alf/predicate/nodes/and.rb
alf-core-0.16.0 lib/alf/predicate/nodes/and.rb
alf-core-0.15.0 lib/alf/predicate/nodes/and.rb
alf-core-0.14.0 lib/alf-predicate/alf/predicate/nodes/and.rb
alf-core-0.13.1 lib/alf-predicate/alf/predicate/nodes/and.rb
alf-core-0.13.0 lib/alf-predicate/alf/predicate/nodes/and.rb