Module: Dry::Logic

Defined in:
lib/dry/logic.rb,
lib/dry/logic/rule.rb,
lib/dry/logic/result.rb,
lib/dry/logic/version.rb,
lib/dry/logic/appliable.rb,
lib/dry/logic/evaluator.rb,
lib/dry/logic/operators.rb,
lib/dry/logic/predicates.rb,
lib/dry/logic/operations/or.rb,
lib/dry/logic/rule_compiler.rb,
lib/dry/logic/operations/and.rb,
lib/dry/logic/operations/key.rb,
lib/dry/logic/operations/set.rb,
lib/dry/logic/operations/xor.rb,
lib/dry/logic/rule/predicate.rb,
lib/dry/logic/operations/attr.rb,
lib/dry/logic/operations/each.rb,
lib/dry/logic/operations/check.rb,
lib/dry/logic/operations/unary.rb,
lib/dry/logic/operations/binary.rb,
lib/dry/logic/operations/abstract.rb,
lib/dry/logic/operations/negation.rb,
lib/dry/logic/operations/implication.rb

Defined Under Namespace

Modules: Appliable, Operations, Operators, Predicates Classes: Evaluator, Result, Rule, RuleCompiler

Constant Summary collapse

VERSION =
'0.4.2'.freeze

Class Method Summary collapse

Class Method Details

.Rule(*args, **options, &block) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/dry/logic/rule.rb', line 8

def self.Rule(*args, **options, &block)
  if args.any?
    Rule.new(*args, Rule::DEFAULT_OPTIONS.merge(options))
  elsif block
    Rule.new(block, Rule::DEFAULT_OPTIONS.merge(options))
  end
end