Class: UnifiedSettings::Config
- Inherits:
-
Object
- Object
- UnifiedSettings::Config
- Defined in:
- lib/unified_settings/unified_settings.rb
Overview
Config object to emulate ActiveSupport::Configurable behavior that is deprecated in Rails 8.2
Instance Attribute Summary collapse
-
#case_sensitive ⇒ Object
Returns the value of attribute case_sensitive.
-
#coerce_array_separator ⇒ Object
Returns the value of attribute coerce_array_separator.
-
#coerce_arrays ⇒ Object
Returns the value of attribute coerce_arrays.
-
#coercions ⇒ Object
Returns the value of attribute coercions.
-
#default_value ⇒ Object
Returns the value of attribute default_value.
-
#handlers ⇒ Object
Returns the value of attribute handlers.
-
#on_missing_key ⇒ Object
Returns the value of attribute on_missing_key.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/unified_settings/unified_settings.rb', line 13 def initialize @handlers = [ Handlers::Env, Handlers::Credentials, Handlers::Constants ] @default_value = nil @case_sensitive = false @on_missing_key = [:log_error] @coercions = i[nil boolean integer float] @coerce_arrays = true @coerce_array_separator = ',' end |
Instance Attribute Details
#case_sensitive ⇒ Object
Returns the value of attribute case_sensitive.
10 11 12 |
# File 'lib/unified_settings/unified_settings.rb', line 10 def case_sensitive @case_sensitive end |
#coerce_array_separator ⇒ Object
Returns the value of attribute coerce_array_separator.
10 11 12 |
# File 'lib/unified_settings/unified_settings.rb', line 10 def coerce_array_separator @coerce_array_separator end |
#coerce_arrays ⇒ Object
Returns the value of attribute coerce_arrays.
10 11 12 |
# File 'lib/unified_settings/unified_settings.rb', line 10 def coerce_arrays @coerce_arrays end |
#coercions ⇒ Object
Returns the value of attribute coercions.
10 11 12 |
# File 'lib/unified_settings/unified_settings.rb', line 10 def coercions @coercions end |
#default_value ⇒ Object
Returns the value of attribute default_value.
10 11 12 |
# File 'lib/unified_settings/unified_settings.rb', line 10 def default_value @default_value end |
#handlers ⇒ Object
Returns the value of attribute handlers.
10 11 12 |
# File 'lib/unified_settings/unified_settings.rb', line 10 def handlers @handlers end |
#on_missing_key ⇒ Object
Returns the value of attribute on_missing_key.
10 11 12 |
# File 'lib/unified_settings/unified_settings.rb', line 10 def on_missing_key @on_missing_key end |