Class: Dry::Logic::Rule::Negation
- Inherits:
-
Value
- Object
- Dry::Logic::Rule
- Value
- Dry::Logic::Rule::Negation
- Defined in:
- lib/dry/logic/rule/negation.rb
Instance Attribute Summary
Attributes inherited from Dry::Logic::Rule
Instance Method Summary collapse
Methods inherited from Value
Methods inherited from Dry::Logic::Rule
#and, #curry, #each?, #initialize, #negation, #new, #or, #predicate_id, #then, #xor
Constructor Details
This class inherits a constructor from Dry::Logic::Rule
Instance Method Details
#call(input) ⇒ Object
9 10 11 |
# File 'lib/dry/logic/rule/negation.rb', line 9 def call(input) predicate.(input).negated end |
#type ⇒ Object
5 6 7 |
# File 'lib/dry/logic/rule/negation.rb', line 5 def type :not end |