Class: Dry::Logic::Result::Value
- Inherits:
-
Dry::Logic::Result
- Object
- Dry::Logic::Result
- Dry::Logic::Result::Value
- Defined in:
- lib/dry/logic/result/value.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Dry::Logic::Result
#input, #response, #rule, #success
Instance Method Summary collapse
Methods inherited from Dry::Logic::Result
[], #[], #failure?, #initialize, #name, #negated, #success?
Constructor Details
This class inherits a constructor from Dry::Logic::Result
Instance Method Details
#to_ast ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/dry/logic/result/value.rb', line 4 def to_ast if response.respond_to?(:to_ast) response.to_ast else [:result, [rule.evaluate(input), rule.to_ast]] end end |