Class: FeatureRelease::Storage

Inherits:
Object
  • Object
show all
Defined in:
lib/feature_release/storage.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Storage

Returns a new instance of Storage.



5
6
7
# File 'lib/feature_release/storage.rb', line 5

def initialize(options={})
  @store = options.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_allObject



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