Class: Dry::Logic::Result::LazyValue

Inherits:
Dry::Logic::Result show all
Defined in:
lib/dry/logic/result.rb

Instance Attribute Summary

Attributes inherited from Dry::Logic::Result

#name, #rule, #value

Instance Method Summary collapse

Methods inherited from Dry::Logic::Result

#>, #and, #call, #curry, #failure?, #initialize, #negated, #or, #success?, #xor

Constructor Details

This class inherits a constructor from Dry::Logic::Result

Instance Method Details

#inputObject



65
66
67
# File 'lib/dry/logic/result.rb', line 65

def input
  success? ? rule.evaluate_input(@input) : @input
end

#to_aryObject Also known as: to_a



60
61
62
# File 'lib/dry/logic/result.rb', line 60

def to_ary
  [:input, [rule.name, input, [rule.to_ary]]]
end