Module: FeatureFlagger

Defined in:
lib/feature_flagger.rb,
lib/feature_flagger/model.rb,
lib/feature_flagger/feature.rb,
lib/feature_flagger/version.rb,
lib/feature_flagger/control.rb,
lib/feature_flagger/storage/redis.rb

Defined Under Namespace

Modules: Model, Storage Classes: Control, Feature, KeyNotFoundError

Constant Summary collapse

VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.configObject

TODO: rename to just config.


18
19
20
# File 'lib/feature_flagger.rb', line 18

def config
  @@config
end

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:


12
13
14
15
# File 'lib/feature_flagger.rb', line 12

def configure(&block)
  set_config
  yield self if block_given?
end

.controlObject


22
23
24
# File 'lib/feature_flagger.rb', line 22

def control
  @@control ||= Control.new(storage)
end

.storageObject


31
32
33
34
# File 'lib/feature_flagger.rb', line 31

def storage
  set_config
  @@config[:storage]
end

.storage=(storage) ⇒ Object


26
27
28
29
# File 'lib/feature_flagger.rb', line 26

def storage=(storage)
  set_config
  @@config[:storage] = storage
end