Class: PgDice::PartitionDropperFactory
- Inherits:
-
Object
- Object
- PgDice::PartitionDropperFactory
- Extended by:
- Forwardable
- Defined in:
- lib/pgdice/partition_dropper_factory.rb
Overview
PartitionListerFactory is a class used to build PartitionListers
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(configuration, opts = {}) ⇒ PartitionDropperFactory
constructor
A new instance of PartitionDropperFactory.
Constructor Details
#initialize(configuration, opts = {}) ⇒ PartitionDropperFactory
Returns a new instance of PartitionDropperFactory.
11 12 13 14 |
# File 'lib/pgdice/partition_dropper_factory.rb', line 11 def initialize(configuration, opts = {}) @configuration = configuration @query_executor = opts[:query_executor] ||= ->(sql) { database_connection.execute(sql) } end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/pgdice/partition_dropper_factory.rb', line 16 def call PgDice::PartitionDropper.new(logger: logger, query_executor: @query_executor) end |