Class: Dry::Logic::Rule::Disjunction

Inherits:
Composite show all
Defined in:
lib/dry/logic/rule/composite.rb

Instance Attribute Summary

Attributes inherited from Composite

#left, #name, #right

Attributes inherited from Dry::Logic::Rule

#name, #predicate

Instance Method Summary collapse

Methods inherited from Composite

#initialize, #to_ary

Methods inherited from Dry::Logic::Rule

#and, #curry, #initialize, #negation, #new, #or, #predicate_id, #then, #to_ary, #xor

Constructor Details

This class inherits a constructor from Dry::Logic::Rule::Composite

Instance Method Details

#call(*args) ⇒ Object



44
45
46
# File 'lib/dry/logic/rule/composite.rb', line 44

def call(*args)
  left.(*args).or(right)
end

#typeObject



48
49
50
# File 'lib/dry/logic/rule/composite.rb', line 48

def type
  :or
end