Class: Dry::Logic::Evaluator::Set
- Inherits:
-
Object
- Object
- Dry::Logic::Evaluator::Set
- Defined in:
- lib/dry/logic/evaluator.rb
Instance Attribute Summary collapse
-
#evaluators ⇒ Object
readonly
Returns the value of attribute evaluators.
Class Method Summary collapse
Instance Method Summary collapse
- #call(input) ⇒ Object (also: #[])
-
#initialize(evaluators) ⇒ Set
constructor
A new instance of Set.
Constructor Details
#initialize(evaluators) ⇒ Set
Returns a new instance of Set.
19 20 21 |
# File 'lib/dry/logic/evaluator.rb', line 19 def initialize(evaluators) @evaluators = evaluators end |
Instance Attribute Details
#evaluators ⇒ Object (readonly)
Returns the value of attribute evaluators.
13 14 15 |
# File 'lib/dry/logic/evaluator.rb', line 13 def evaluators @evaluators end |
Class Method Details
Instance Method Details
#call(input) ⇒ Object Also known as: []
23 24 25 |
# File 'lib/dry/logic/evaluator.rb', line 23 def call(input) evaluators.map { |evaluator| evaluator[input] } end |