Method: UltraSettings::Field#source

Defined in:
lib/ultra_settings/field.rb

#source(env: nil, settings: nil, yaml_config: nil) ⇒ Symbol?

Get the source for the field from the passed in state.

Parameters:

  • env (Hash) (defaults to: nil)

    The environment variables.

  • settings (Hash) (defaults to: nil)

    The runtime settings.

  • yaml_config (Hash) (defaults to: nil)

    The YAML configuration.

Returns:

  • (Symbol, nil)

    The source of the value (:env, :settings, or :yaml).



64
65
66
# File 'lib/ultra_settings/field.rb', line 64

def source(env: nil, settings: nil, yaml_config: nil)
  fetch_value_and_source(env: env, settings: settings, yaml_config: yaml_config).last
end