Class: ConsulApplicationSettings::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/consul_application_settings/configuration.rb

Overview

All gem configuration settings

Constant Summary collapse

DEFAULT_BASE_FILE_PATH =
'config/app_settings.yml'.freeze
DEFAULT_LOCAL_FILE_PATH =
'config/app_settings.local.yml'.freeze
DEFAULT_PROVIDERS =
[
  ConsulApplicationSettings::Providers::ConsulPreloaded,
  ConsulApplicationSettings::Providers::LocalStorage
].freeze
DEFAULT_RESOLVERS =
[
  ConsulApplicationSettings::Resolvers::Env
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



16
17
18
19
20
21
22
# File 'lib/consul_application_settings/configuration.rb', line 16

def initialize
  @base_file_path = DEFAULT_BASE_FILE_PATH
  @local_file_path = DEFAULT_LOCAL_FILE_PATH
  @disable_consul_connection_errors = true
  @settings_providers = DEFAULT_PROVIDERS
  @value_resolvers = DEFAULT_RESOLVERS
end

Instance Attribute Details

#base_file_pathObject

Returns the value of attribute base_file_path.



13
14
15
# File 'lib/consul_application_settings/configuration.rb', line 13

def base_file_path
  @base_file_path
end

#disable_consul_connection_errorsObject

Returns the value of attribute disable_consul_connection_errors.



13
14
15
# File 'lib/consul_application_settings/configuration.rb', line 13

def disable_consul_connection_errors
  @disable_consul_connection_errors
end

#local_file_pathObject

Returns the value of attribute local_file_path.



13
14
15
# File 'lib/consul_application_settings/configuration.rb', line 13

def local_file_path
  @local_file_path
end

#settings_providersObject

Returns the value of attribute settings_providers.



13
14
15
# File 'lib/consul_application_settings/configuration.rb', line 13

def settings_providers
  @settings_providers
end

#value_resolversObject

Returns the value of attribute value_resolvers.



13
14
15
# File 'lib/consul_application_settings/configuration.rb', line 13

def value_resolvers
  @value_resolvers
end