module Dry::Types

def self.Rule(options)

Other tags:
    Api: - public

Returns:
  • (Dry::Logic::Rule) -

Parameters:
  • options (Hash) --
def self.Rule(options)
  rule_compiler.(
    options.map { |key, val|
      ::Dry::Logic::Rule::Predicate.build(
        ::Dry::Logic::Predicates[:"#{key}?"]
      ).curry(val).to_ast
    }
  ).reduce(:and)
end