Class: Flipper::Toggles::Boolean
- Inherits:
-
Flipper::Toggle
- Object
- Flipper::Toggle
- Flipper::Toggles::Boolean
- Defined in:
- lib/flipper/toggles/boolean.rb
Instance Attribute Summary
Attributes inherited from Flipper::Toggle
Instance Method Summary collapse
Methods inherited from Flipper::Toggle
Constructor Details
This class inherits a constructor from Flipper::Toggle
Instance Method Details
#disable(thing) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/flipper/toggles/boolean.rb', line 8 def disable(thing) adapter.delete key adapter.delete "#{gate.key_prefix}#{Gate::Separator}#{Gates::Actor::Key}" adapter.delete "#{gate.key_prefix}#{Gate::Separator}#{Gates::Group::Key}" adapter.delete "#{gate.key_prefix}#{Gate::Separator}#{Gates::PercentageOfActors::Key}" adapter.delete "#{gate.key_prefix}#{Gate::Separator}#{Gates::PercentageOfRandom::Key}" end |
#enable(thing) ⇒ Object
4 5 6 |
# File 'lib/flipper/toggles/boolean.rb', line 4 def enable(thing) adapter.write key, thing.enabled_value end |
#value ⇒ Object
16 17 18 |
# File 'lib/flipper/toggles/boolean.rb', line 16 def value adapter.read key end |