Class | Settings |
In: |
lib/facets/more/settings.rb
|
Parent: | Object |
Settings holds configuration information organized by Owners. An owner is a class that represents the system to be configured. An alias for this class is Settings.
You can pass strings, constants or symbols as keys for the classes to be configured. Passing symbols you can configure classes even before they are defined.
add_setting | -> | setting |
settings | -> | all |
settings | -> | [] |
Manually add a Settings setting. The class key can be the actual class name constant or a symbol. If the setting is already defined it updates it.
Settings.add_setting Compiler, :verification, :value => 12, :doc => ’…’ Settings.setting :IdPart, :verify_registration_email, :value => false s = Settings.Compiler.verification.value
Inject the Settings parameters provided as a hash (dictionary, ordered) to classes to be configured.