Class: FlatMap::Mapping::Reader::Proc
- Defined in:
- lib/flat_map/mapping/reader/proc.rb
Overview
Proc reader accepts a lambda and calls it with the target as an argument for reading.
Instance Attribute Summary
Attributes inherited from Basic
Instance Method Summary collapse
-
#read ⇒ Object
Call a
@method
, which is a Proc object, passing thetarget
object to it.
Methods inherited from Method
Methods inherited from Basic
Constructor Details
This class inherits a constructor from FlatMap::Mapping::Reader::Method
Instance Method Details
#read ⇒ Object
Call a @method
, which is a FlatMap::Mapping::Reader::Proc object, passing the target
object to it.
10 11 12 |
# File 'lib/flat_map/mapping/reader/proc.rb', line 10 def read @method.call(target) end |