Sha256: 8de929318c1f1d8f263ecce9f9a0b9649b5c2d075de72460b59e489290b985d7
Contents?: true
Size: 409 Bytes
Versions: 1
Compression:
Stored size: 409 Bytes
Contents
module Flipper module Toggles class Value < Toggle def enable(thing) super adapter.write adapter_key, thing.value true end def disable(thing) super adapter.delete adapter_key true end def value adapter.read adapter_key end def enabled? !value.nil? && value.to_i > 0 end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flipper-0.4.0 | lib/flipper/toggles/value.rb |