Module: Bugsnag::Utility::FeatureDataStore Abstract
Overview
Requires a #feature_flag_delegate method returning a FeatureFlagDelegate
Instance Method Summary collapse
-
#add_feature_flag(name, variant = nil) ⇒ void
Add a feature flag with the given name & variant.
-
#add_feature_flags(feature_flags) ⇒ void
Merge the given array of FeatureFlag instances into the stored feature flags.
-
#clear_feature_flag(name) ⇒ void
Remove the stored flag with the given name.
-
#clear_feature_flags ⇒ void
Remove all the stored flags.
Instance Method Details
#add_feature_flag(name, variant = nil) ⇒ void
This method returns an undefined value.
Add a feature flag with the given name & variant
10 11 12 |
# File 'lib/bugsnag/utility/feature_data_store.rb', line 10 def add_feature_flag(name, variant = nil) feature_flag_delegate.add(name, variant) end |
#add_feature_flags(feature_flags) ⇒ void
This method returns an undefined value.
Merge the given array of FeatureFlag instances into the stored feature flags
New flags will be appended to the array. Flags with the same name will be overwritten, but their position in the array will not change
22 23 24 |
# File 'lib/bugsnag/utility/feature_data_store.rb', line 22 def add_feature_flags(feature_flags) feature_flag_delegate.merge(feature_flags) end |
#clear_feature_flag(name) ⇒ void
This method returns an undefined value.
Remove the stored flag with the given name
30 31 32 |
# File 'lib/bugsnag/utility/feature_data_store.rb', line 30 def clear_feature_flag(name) feature_flag_delegate.remove(name) end |
#clear_feature_flags ⇒ void
This method returns an undefined value.
Remove all the stored flags
37 38 39 |
# File 'lib/bugsnag/utility/feature_data_store.rb', line 37 def clear_feature_flags feature_flag_delegate.clear end |