Sha256: 1b78242b674b71a3b5f3d4a81667abf7566e35a33105985b492e4b0290654360

Contents?: true

Size: 506 Bytes

Versions: 9

Compression:

Stored size: 506 Bytes

Contents

# frozen_string_literal: true

module Dry
  module Logic
    module Operators
      def and(other)
        Operations::And.new(self, other)
      end
      alias_method :&, :and

      def or(other)
        Operations::Or.new(self, other)
      end
      alias_method :|, :or

      def xor(other)
        Operations::Xor.new(self, other)
      end
      alias_method :^, :xor

      def then(other)
        Operations::Implication.new(self, other)
      end
      alias_method :>, :then
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
dry-logic-1.5.0 lib/dry/logic/operators.rb
dry-logic-1.4.0 lib/dry/logic/operators.rb
dry-logic-1.3.0 lib/dry/logic/operators.rb
dry-logic-1.2.0 lib/dry/logic/operators.rb
dry-logic-1.1.1 lib/dry/logic/operators.rb
dry-logic-1.1.0 lib/dry/logic/operators.rb
dry-logic-1.0.8 lib/dry/logic/operators.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/dry-logic-1.0.7/lib/dry/logic/operators.rb
dry-logic-1.0.7 lib/dry/logic/operators.rb