Sha256: 1d9a218a6301e5326de156304ed84f659362b23bbc523bb46e9a81579436841a

Contents?: true

Size: 417 Bytes

Versions: 1

Compression:

Stored size: 417 Bytes

Contents

module Flipper
  module Toggles
    class Set < Toggle
      def enable(thing)
        super
        adapter.set_add adapter_key, thing.value
        true
      end

      def disable(thing)
        super
        adapter.set_delete adapter_key, thing.value
        true
      end

      def value
        adapter.set_members adapter_key
      end

      def enabled?
        !value.empty?
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flipper-0.4.0 lib/flipper/toggles/set.rb