Class: Cascade::ComplexFields::ArrayProcessor
- Inherits:
-
Object
- Object
- Cascade::ComplexFields::ArrayProcessor
- Defined in:
- lib/cascade/complex_fields/array_processor.rb
Instance Method Summary collapse
- #call(values) ⇒ Object
-
#initialize(processor) ⇒ ArrayProcessor
constructor
A new instance of ArrayProcessor.
Constructor Details
#initialize(processor) ⇒ ArrayProcessor
Returns a new instance of ArrayProcessor.
4 5 6 |
# File 'lib/cascade/complex_fields/array_processor.rb', line 4 def initialize(processor) @processor = processor end |
Instance Method Details
#call(values) ⇒ Object
8 9 10 |
# File 'lib/cascade/complex_fields/array_processor.rb', line 8 def call(values) values.map { |value| @processor.call(value) } end |