Class: FlatMap::Mapping::Factory

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(*args) ⇒ Factory

Simply store all arguments necessary to create a new mapping for a specific mapper.

Parameters:

  • args (*Object)


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.

Parameters:

Returns:



17
18
19
# File 'lib/flat_map/mapping/factory.rb', line 17

def create(mapper)
  Mapping.new(mapper, *@args)
end