Class: FeatureFlagger::Configuration
- Inherits:
-
Object
- Object
- FeatureFlagger::Configuration
- Defined in:
- lib/feature_flagger/configuration.rb
Instance Attribute Summary collapse
-
#cache_store ⇒ Object
Returns the value of attribute cache_store.
-
#manifest_source ⇒ Object
Returns the value of attribute manifest_source.
-
#notifier_callback ⇒ Object
Returns the value of attribute notifier_callback.
-
#storage ⇒ Object
Returns the value of attribute storage.
Instance Method Summary collapse
- #info ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #mapped_feature_keys(resource_name = nil) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 |
# File 'lib/feature_flagger/configuration.rb', line 5 def initialize @storage ||= Storage::Redis.default_client @manifest_source ||= FeatureFlagger::ManifestSources::WithYamlFile.new @notifier_callback = nil @cache_store = nil end |
Instance Attribute Details
#cache_store ⇒ Object
Returns the value of attribute cache_store.
3 4 5 |
# File 'lib/feature_flagger/configuration.rb', line 3 def cache_store @cache_store end |
#manifest_source ⇒ Object
Returns the value of attribute manifest_source.
3 4 5 |
# File 'lib/feature_flagger/configuration.rb', line 3 def manifest_source @manifest_source end |
#notifier_callback ⇒ Object
Returns the value of attribute notifier_callback.
3 4 5 |
# File 'lib/feature_flagger/configuration.rb', line 3 def notifier_callback @notifier_callback end |
#storage ⇒ Object
Returns the value of attribute storage.
3 4 5 |
# File 'lib/feature_flagger/configuration.rb', line 3 def storage @storage end |
Instance Method Details
#info ⇒ Object
19 20 21 |
# File 'lib/feature_flagger/configuration.rb', line 19 def info @manifest_source.resolved_info end |
#mapped_feature_keys(resource_name = nil) ⇒ Object
23 24 25 26 27 28 |
# File 'lib/feature_flagger/configuration.rb', line 23 def mapped_feature_keys(resource_name = nil) info_filtered = resource_name ? info[resource_name] : info [].tap do |keys| make_keys_recursively(info_filtered).each { |key| keys.push(join_key(resource_name, key)) } end end |