Sha256: cd4608ef0f9f1c838e0a9dd0bf098321fd7e84c26f051db4ef3a481c02e50e47

Contents?: true

Size: 631 Bytes

Versions: 5

Compression:

Stored size: 631 Bytes

Contents

# frozen_string_literal: true

require "dry/configurable"

module Hanami
  class Config
    # Hanami DB config
    #
    # @since 2.2.0
    # @api public
    class DB
      include Dry::Configurable

      setting :configure_from_parent, default: true

      setting :import_from_parent, default: false

      private

      def method_missing(name, *args, &block)
        if config.respond_to?(name)
          config.public_send(name, *args, &block)
        else
          super
        end
      end

      def respond_to_missing?(name, _include_all = false)
        config.respond_to?(name) || super
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hanami-2.2.1 lib/hanami/config/db.rb
hanami-2.2.0 lib/hanami/config/db.rb
hanami-2.2.0.rc1 lib/hanami/config/db.rb
hanami-2.2.0.beta2 lib/hanami/config/db.rb
hanami-2.2.0.beta1 lib/hanami/config/db.rb