Class: PgDice::PartitionManagerFactory
- Inherits:
-
Object
- Object
- PgDice::PartitionManagerFactory
- Defined in:
- lib/pgdice/partition_manager_factory.rb
Overview
PartitionManagerFactory is a class used to build PartitionManagers
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration, opts = {}) ⇒ PartitionManagerFactory
constructor
A new instance of PartitionManagerFactory.
Constructor Details
#initialize(configuration, opts = {}) ⇒ PartitionManagerFactory
Returns a new instance of PartitionManagerFactory.
7 8 9 10 11 12 |
# File 'lib/pgdice/partition_manager_factory.rb', line 7 def initialize(configuration, opts = {}) @configuration = configuration initialize_simple_factories(opts) initialize_complex_factories(opts) initialize_values(opts) end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pgdice/partition_manager_factory.rb', line 14 def call PgDice::PartitionManager.new(logger: @logger_factory.call, batch_size: @batch_size_factory.call, approved_tables: @approved_tables_factory.call, validation: @validation_factory.call, partition_adder: @partition_adder_factory.call, partition_lister: @partition_lister_factory.call, partition_dropper: @partition_dropper_factory.call, current_date_provider: @current_date_provider) end |