Module: Dry::Configurable Private

Includes:
Dry::Core::Constants
Defined in:
lib/dry/configurable.rb,
lib/dry/configurable/dsl.rb,
lib/dry/configurable/config.rb,
lib/dry/configurable/errors.rb,
lib/dry/configurable/methods.rb,
lib/dry/configurable/setting.rb,
lib/dry/configurable/version.rb,
lib/dry/configurable/compiler.rb,
lib/dry/configurable/settings.rb,
lib/dry/configurable/constants.rb,
lib/dry/configurable/extension.rb,
lib/dry/configurable/class_methods.rb,
lib/dry/configurable/test_interface.rb,
lib/dry/configurable/instance_methods.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Shared constants

Defined Under Namespace

Modules: ClassMethods, Initializer, InstanceMethods, Methods, TestInterface Classes: Compiler, Config, DSL, Extension, Setting, Settings

Constant Summary collapse

Error =
Class.new(::StandardError)
AlreadyIncludedError =
Class.new(Error)
FrozenConfigError =
Class.new(Error)
VERSION =
"1.1.0"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



64
65
66
67
# File 'lib/dry/configurable.rb', line 64

def self.extended(klass)
  super
  klass.extend(Extension.new)
end

.included(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



70
71
72
73
# File 'lib/dry/configurable.rb', line 70

def self.included(klass)
  super
  klass.include(Extension.new)
end

.loaderObject



49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/dry/configurable.rb', line 49

def self.loader
  @loader ||= Zeitwerk::Loader.new.tap do |loader|
    root = File.expand_path("..", __dir__)
    loader.tag = "dry-configurable"
    loader.inflector = Zeitwerk::GemInflector.new("#{root}/dry-configurable.rb")
    loader.push_dir(root)
    loader.ignore(
      "#{root}/dry-configurable.rb",
      "#{root}/dry/configurable/{constants,errors,version}.rb"
    )
    loader.inflector.inflect("dsl" => "DSL")
  end
end

Instance Method Details

#enable_test_interfaceObject

Mixes in test interface into the configurable module



20
21
22
# File 'lib/dry/configurable/test_interface.rb', line 20

def enable_test_interface
  extend Dry::Configurable::TestInterface
end