Module: Sinclair::ChainSettable
Overview
Settable that recovers data from other settables
Each setting obeys a settable order and when a setting value is not found, the next is checked
Instance Method Summary collapse
-
#source(key, source) ⇒ Class<Settable>
Register a setting source.
-
#sources(*sources) ⇒ Array<Symbol>
Defines the order of the settings.
Methods included from Settable::ClassMethods
Methods included from Settable
#settable_module, #setting_with_options, #with_settings
Instance Method Details
#source(key, source) ⇒ Class<Settable>
Register a setting source
33 34 35 |
# File 'lib/sinclair/chain_settable.rb', line 33 def source(key, source) sources_map[key] = source end |
#sources(*sources) ⇒ Array<Symbol>
Defines the order of the settings
46 47 48 |
# File 'lib/sinclair/chain_settable.rb', line 46 def sources(*sources) @sources = sources end |