lib/secret_config/registry.rb
# Returns [String] configuration value for the supplied key
# Convert the string value into an array of values by supplying a `separator`.
Returns [String] configuration value for the supplied key
Convert the string value into an array of values by supplying a `separator`.
Returns [ String ] configuration value for the supplied key Convert the string value into an array of values by supplying a ` separator ` .
def fetch(key, default: :no_default_supplied, type: :string, encoding: nil, separator: nil)
      value = self[key]
      if value.nil?
        raise(MissingMandatoryKey, "Missing configuration value for #{path}/#{key}") if default == :no_default_supplied
        value = block_given? ? yield : default
      end
      value = convert_encoding(encoding, value) if encoding
      return convert_type(type, value) unless separator
      return value if value.is_a?(Array)
      value.to_s.split(separator).collect { |element| convert_type(type, element.strip) }
    end
def fetch ( key , default : :no_default_supplied , type : :string , encoding : nil , separator : nil ) value = self [ key ] if value . nil? raise ( MissingMandatoryKey , "Missing configuration value for #{path}/#{key}" ) if default == :no_default_supplied value = block_given? ? yield : default end value = convert_encoding ( encoding , value ) if encoding return convert_type ( type , value ) unless separator return value if value . is_a? ( Array ) value . to_s . split ( separator ) . collect { | element | convert_type ( type , element . strip ) } end
Returns [String] configuration value for the supplied key
Convert the string value into an array of values by supplying a `separator`.
Returns [ String ] configuration value for the supplied key Convert the string value into an array of values by supplying a ` separator ` .
key
<not_specific>
default
<not_specific>
type
<not_specific>
encoding
<not_specific>
separator
<not_specific>