Class: FlatMap::Mapping::Writer::Proc
- Defined in:
- lib/flat_map/mapping/writer/proc.rb
Overview
Proc writer calls a lambda passed on the mapping definition and sends the mapper’s target and value to it.
Note that this doesn’t set anything on the target itself.
Instance Attribute Summary
Attributes inherited from Basic
Instance Method Summary collapse
-
#write(value) ⇒ Object
Call a
@method
, which is aProc
object, passing it the mapping’starget
andvalue
.
Methods inherited from Method
Methods inherited from Basic
Constructor Details
This class inherits a constructor from FlatMap::Mapping::Writer::Method
Instance Method Details
#write(value) ⇒ Object
Call a @method
, which is a Proc
object, passing it the mapping’s target
and value
.
13 14 15 |
# File 'lib/flat_map/mapping/writer/proc.rb', line 13 def write(value) @method.call(target, value) end |