Sha256: 1dccda82491362d387daf462c97f05d5447a6445e4bdb7f5ed701ba310899b8b

Contents?: true

Size: 446 Bytes

Versions: 10

Compression:

Stored size: 446 Bytes

Contents

require 'dry/logic/predicate'
require 'dry-container'

module Dry
  module Logic
    module PredicateSet
      module Methods
        def predicate(name, &block)
          register(name) { Predicate.new(name, &block) }
        end

        def import(predicate_set)
          merge(predicate_set)
        end
      end

      def self.extended(other)
        super
        other.extend(Methods, Dry::Container::Mixin)
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dry-logic-0.3.0 lib/dry/logic/predicate_set.rb
dry-logic-0.2.3 lib/dry/logic/predicate_set.rb
dry-logic-0.2.2 lib/dry/logic/predicate_set.rb
dry-logic-0.2.1 lib/dry/logic/predicate_set.rb
dry-logic-0.2.0 lib/dry/logic/predicate_set.rb
dry-logic-0.1.4 lib/dry/logic/predicate_set.rb
dry-logic-0.1.3 lib/dry/logic/predicate_set.rb
dry-logic-0.1.2 lib/dry/logic/predicate_set.rb
dry-logic-0.1.1 lib/dry/logic/predicate_set.rb
dry-logic-0.1.0 lib/dry/logic/predicate_set.rb