Class: FlatMap::Mapping::Factory
- Inherits:
-
Object
- Object
- FlatMap::Mapping::Factory
- Defined in:
- lib/flat_map/mapping/factory.rb
Overview
Factory objects store mapping definitions within mapper class and are used eventually to generate mapping objects for a particular mapper.
Instance Method Summary collapse
-
#create(mapper) ⇒ FlatMap::Mapping
Return a new mapping, initialized by
mapper
and@args
. -
#initialize(*args) ⇒ Factory
constructor
Simply store all arguments necessary to create a new mapping for a specific mapper.
Constructor Details
#initialize(*args) ⇒ Factory
Simply store all arguments necessary to create a new mapping for a specific mapper.
9 10 11 |
# File 'lib/flat_map/mapping/factory.rb', line 9 def initialize(*args) @args = args end |
Instance Method Details
#create(mapper) ⇒ FlatMap::Mapping
Return a new mapping, initialized by mapper
and @args
.
17 18 19 |
# File 'lib/flat_map/mapping/factory.rb', line 17 def create(mapper) Mapping.new(mapper, *@args) end |