Class: ContainerConfig::Provider::Default

Inherits:
Base
  • Object
show all
Defined in:
lib/container_config/provider/default.rb

Overview

Default config value provider (handles :default option)

Instance Method Summary collapse

Instance Method Details

#load(key, *dig_keys, **options) ⇒ Object

Loads a default configuration setting based on the value of options

Parameters:

  • key (String) —

    Configuration key to load

  • dig_keys (Array) —

    Variable keys to use to load from providers that accept a dig structure

  • options (Hash) —

    Options Hash

Options Hash (**options):

  • :default (String) —

    default value if the configuration setting cannot be found

Returns:

  • (Object) —

    configuration setting value



24
25
26
27
# File 'lib/container_config/provider/default.rb', line 24

def load(key, *dig_keys, **options)
  super
  options[:default]
end

#name ⇒ Object

See Also:



10
11
12
# File 'lib/container_config/provider/default.rb', line 10

def name
  "Default Value"
end