module Bugsnag::Utility::FeatureDataStore
@abstract Requires a feature_flag_delegate method returning a
{Bugsnag::Utility::FeatureFlagDelegate}
Public Instance Methods
add_feature_flag(name, variant = nil)
click to toggle source
Add a feature flag with the given name & variant
@param name [String] @param variant [String, nil] @return [void]
# 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)
click to toggle source
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
@param feature_flags [Array<Bugsnag::FeatureFlag>] @return [void]
# 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)
click to toggle source
Remove the stored flag with the given name
@param name [String] @return [void]
# File lib/bugsnag/utility/feature_data_store.rb, line 30 def clear_feature_flag(name) feature_flag_delegate.remove(name) end
clear_feature_flags()
click to toggle source
Remove all the stored flags
@return [void]
# File lib/bugsnag/utility/feature_data_store.rb, line 37 def clear_feature_flags feature_flag_delegate.clear end