Class: Dry::Logic::Evaluator::Key

Inherits:
Dry::Logic::Evaluator show all
Defined in:
lib/dry/logic/evaluator.rb

Instance Attribute Summary

Attributes inherited from Dry::Logic::Evaluator

#path

Instance Method Summary collapse

Methods inherited from Dry::Logic::Evaluator

#initialize

Constructor Details

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

Instance Method Details

#call(input) ⇒ Object Also known as: []



30
31
32
# File 'lib/dry/logic/evaluator.rb', line 30

def call(input)
  path.reduce(input) { |a, e| a[e] }
end