Module: SharedSettings
- Extended by:
- Forwardable, SharedSettings
- Included in:
- SharedSettings
- Defined in:
- lib/shared-settings.rb,
lib/shared_settings/ui.rb,
lib/shared_settings/setting.rb,
lib/shared_settings/version.rb,
lib/shared_settings/instance.rb,
lib/shared_settings/ui/action.rb,
lib/shared_settings/configuration.rb,
lib/shared_settings/ui/middleware.rb,
lib/shared_settings/ui/actions/asset.rb,
lib/shared_settings/ui/actions/mount.rb,
lib/shared_settings/utilities/base16.rb,
lib/shared_settings/persistence/redis.rb,
lib/shared_settings/serialized_setting.rb,
lib/shared_settings/ui/actions/setting.rb,
lib/shared_settings/utilities/encryption.rb
Defined Under Namespace
Modules: Persistence, UI, Utilities
Classes: Configuration, Instance, SerializedSetting, Setting, SettingNotFoundError
Constant Summary
collapse
- VERSION =
'0.1.0'.freeze
Instance Method Summary
collapse
Instance Method Details
26
27
28
|
# File 'lib/shared-settings.rb', line 26
def configure
yield configuration if block_given?
end
|
#exists?(name) ⇒ Boolean
38
39
40
41
42
43
44
|
# File 'lib/shared-settings.rb', line 38
def exists?(name)
get(name)
true
rescue SettingNotFoundError
false
end
|
#instance ⇒ Object
34
35
36
|
# File 'lib/shared-settings.rb', line 34
def instance
configuration.default
end
|
#new(storage_adapter) ⇒ Object
22
23
24
|
# File 'lib/shared-settings.rb', line 22
def new(storage_adapter)
SharedSettings::Instance.new(storage_adapter)
end
|