class Dry::System::Config::ComponentDir

Attributes

path[R]

Returns the component dir path, relative to the configured container root

@return [String] the path

Public Class Methods

new(path) { |self| ... } click to toggle source

@api private

Calls superclass method
# File lib/dry/system/config/component_dir.rb, line 164
def initialize(path)
  super()
  @path = path
  yield self if block_given?
end

Public Instance Methods

auto_register?() click to toggle source

@api private

# File lib/dry/system/config/component_dir.rb, line 171
def auto_register?
  !!config.auto_register
end
configured?(key) click to toggle source

Returns true if a setting has been explicitly configured and is not returning just a default value.

This is used to determine which settings from `ComponentDirs` should be applied as additional defaults.

@api private

# File lib/dry/system/config/component_dir.rb, line 182
def configured?(key)
  config._settings[key].input_defined?
end

Private Instance Methods

method_missing(name, *args, &block) click to toggle source
Calls superclass method
# File lib/dry/system/config/component_dir.rb, line 188
def method_missing(name, *args, &block)
  if config.respond_to?(name)
    config.public_send(name, *args, &block)
  else
    super
  end
end
respond_to_missing?(name, include_all = false) click to toggle source
Calls superclass method
# File lib/dry/system/config/component_dir.rb, line 196
def respond_to_missing?(name, include_all = false)
  config.respond_to?(name) || super
end