Class: Schlepp::Sink::TableObject::Writer::Factory
- Inherits:
-
Object
- Object
- Schlepp::Sink::TableObject::Writer::Factory
- Defined in:
- lib/schlepp/sink/table_object/writer/factory.rb
Instance Method Summary collapse
-
#initialize(factory, components, table_object) ⇒ Factory
constructor
A new instance of Factory.
- #new ⇒ Object
Constructor Details
#initialize(factory, components, table_object) ⇒ Factory
Returns a new instance of Factory.
6 7 8 9 10 |
# File 'lib/schlepp/sink/table_object/writer/factory.rb', line 6 def initialize(factory, components, table_object) @factory = factory @components = components @table_object = table_object end |
Instance Method Details
#new ⇒ Object
12 13 14 15 16 17 |
# File 'lib/schlepp/sink/table_object/writer/factory.rb', line 12 def new writer = @factory.writer(@table_object) @components.reverse.inject(writer) {|base, f| f.writer.new(base) } end |