Sha256: aacccb447eed4d93a7142bafa105a8840ee2999be187304628546f2345db60b3

Contents?: true

Size: 504 Bytes

Versions: 7

Compression:

Stored size: 504 Bytes

Contents

# frozen_string_literal: true

##
# Container for dependencies
#
class PgObjects::Container
  extend ::Dry::Container::Mixin

  register 'config' do
    PgObjects::Config.config
  end

  register 'db_object_factory' do
    PgObjects::DbObjectFactory.new
  end

  register 'parsed_object_factory' do
    PgObjects::ParsedObjectFactory
  end

  register 'parser' do
    PgObjects::Parser.new
  end

  register 'logger' do
    PgObjects::Logger.new
  end
end

Import = Dry::AutoInject(PgObjects::Container)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pg_objects-1.4.0 lib/pg_objects/container.rb
pg_objects-1.3.3 lib/pg_objects/container.rb
pg_objects-1.3.2 lib/pg_objects/container.rb
pg_objects-1.3.1 lib/pg_objects/container.rb
pg_objects-1.3.0 lib/pg_objects/container.rb
pg_objects-1.2.2 lib/pg_objects/container.rb
pg_objects-1.2.1 lib/pg_objects/container.rb