Class: FeatureRelease::Storage
- Inherits:
-
Object
- Object
- FeatureRelease::Storage
- Defined in:
- lib/feature_release/storage.rb
Instance Method Summary collapse
- #get(feature) ⇒ Object
- #get_all ⇒ Object
-
#initialize(options = {}) ⇒ Storage
constructor
A new instance of Storage.
- #save(feature, data) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Storage
Returns a new instance of Storage.
5 6 7 |
# File 'lib/feature_release/storage.rb', line 5 def initialize(={}) @store = .fetch(:store) end |
Instance Method Details
#get(feature) ⇒ Object
13 14 15 |
# File 'lib/feature_release/storage.rb', line 13 def get(feature) retrieve(feature_key(feature)) end |
#get_all ⇒ Object
17 18 19 |
# File 'lib/feature_release/storage.rb', line 17 def get_all (retrieve(global_key) || "").split(",").map(&:to_sym) end |
#save(feature, data) ⇒ Object
9 10 11 |
# File 'lib/feature_release/storage.rb', line 9 def save(feature, data) persist(feature, data) end |