Module: ConfigX::Configurable
- Included in:
- Config, UntypedConfig
- Defined in:
- lib/config_x/configurable.rb
Instance Method Summary collapse
- #to_h ⇒ Hash abstract
-
#with_fallback(fallback) ⇒ Configurable
Merges the current configuration with a fallback configuration.
Instance Method Details
#to_h ⇒ Hash
This method is abstract.
|
# File 'lib/config_x/configurable.rb', line 7
|
#with_fallback(fallback) ⇒ Configurable
Merges the current configuration with a fallback configuration.
15 16 17 18 19 20 21 |
# File 'lib/config_x/configurable.rb', line 15 def with_fallback(fallback) DeepMerge.deep_merge!( to_h, fallback.to_h, overwrite_arrays: true ).then { self.class.new(_1) } end |