Class: Schlepp::Sink::TableObject::Factory
- Inherits:
-
Object
- Object
- Schlepp::Sink::TableObject::Factory
- Defined in:
- lib/schlepp/sink/table_object/factory.rb
Instance Method Summary collapse
-
#initialize(factory, components) ⇒ Factory
constructor
A new instance of Factory.
- #new ⇒ Object
- #writer ⇒ Object
Constructor Details
#initialize(factory, components) ⇒ Factory
Returns a new instance of Factory.
7 8 9 10 |
# File 'lib/schlepp/sink/table_object/factory.rb', line 7 def initialize(factory, components) @factory = factory @components = components end |
Instance Method Details
#new ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/schlepp/sink/table_object/factory.rb', line 12 def new @components.each(&:rotate) url = @components.inject(@factory.url) do |u, f| u.merge("#{u.path}.#{f.extension}") end Hydrogen::TableObject.new(@factory.model, url) end |