Sha256: e97fcd4dd652b11f23817bfb463e4f9aa0b69588dc85c292a9efbfef610d0ea2
Contents?: true
Size: 592 Bytes
Versions: 17
Compression:
Stored size: 592 Bytes
Contents
module FeatureState def feature_broken!(feature_name) set_feature_state! feature_name, "broken" end def feature_working!(feature_name) set_feature_state! feature_name, "working" end def feature_state(feature_name) feature_states[feature_name.to_s] end def broken_features(*features) features.flatten.select { |feature_name| feature_state(feature_name) == "broken" } end def feature_states super || {} end def set_feature_state!(feature_name, state) update_column :feature_states, feature_states.merge(feature_name.to_s => state) end end
Version data entries
17 entries across 17 versions & 1 rubygems