Sha256: feb113eee6e0926006f774bd07a44ede9f0b320738e1064fdec26abd4b4b1b19

Contents?: true

Size: 369 Bytes

Versions: 41

Compression:

Stored size: 369 Bytes

Contents

# Simple class for turning a flipper_id into an actor that can be based
# to Flipper::Feature#enabled?.
module Flipper
  class Actor
    attr_reader :flipper_id

    def initialize(flipper_id)
      @flipper_id = flipper_id
    end

    def eql?(other)
      self.class.eql?(other.class) && @flipper_id == other.flipper_id
    end
    alias_method :==, :eql?
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
flipper-0.24.0 lib/flipper/actor.rb
flipper-0.23.1 lib/flipper/actor.rb
flipper-0.23.0 lib/flipper/actor.rb
flipper-0.22.2 lib/flipper/actor.rb
flipper-0.22.1 lib/flipper/actor.rb
flipper-0.22.0 lib/flipper/actor.rb
flipper-0.21.0 lib/flipper/actor.rb
flipper-0.21.0.rc2 lib/flipper/actor.rb
flipper-0.21.0.rc1 lib/flipper/actor.rb
flipper-0.20.4 lib/flipper/actor.rb
flipper-0.20.3 lib/flipper/actor.rb
flipper-0.20.2 lib/flipper/actor.rb
flipper-0.20.1 lib/flipper/actor.rb
flipper-0.20.0 lib/flipper/actor.rb
flipper-0.20.0.beta3 lib/flipper/actor.rb
flipper-0.20.0.beta2 lib/flipper/actor.rb
flipper-0.20.0.beta1 lib/flipper/actor.rb
flipper-0.19.1 lib/flipper/actor.rb
flipper-0.19.0 lib/flipper/actor.rb
flipper-0.18.0 lib/flipper/actor.rb