Sha256: 464f104852420e1c331a285364e0208518cf0fc63462499daf0ddc1cb4ac759a

Contents?: true

Size: 615 Bytes

Versions: 34

Compression:

Stored size: 615 Bytes

Contents

module Flipper
  # Internal: Root class for all flipper types. You should never need to use this.
  class Type
    def self.wrap(value_or_instance)
      return value_or_instance if value_or_instance.is_a?(self)
      new(value_or_instance)
    end

    attr_reader :value

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

require 'flipper/types/actor'
require 'flipper/types/boolean'
require 'flipper/types/group'
require 'flipper/types/percentage'
require 'flipper/types/percentage_of_actors'
require 'flipper/types/percentage_of_time'

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
flipper-0.15.0 lib/flipper/type.rb
flipper-0.14.0 lib/flipper/type.rb
flipper-0.13.0 lib/flipper/type.rb
flipper-0.13.0.beta1 lib/flipper/type.rb
flipper-0.12.2 lib/flipper/type.rb
flipper-0.12.1 lib/flipper/type.rb
flipper-0.12.0 lib/flipper/type.rb
flipper-0.11.0 lib/flipper/type.rb
flipper-0.11.0.rc1 lib/flipper/type.rb
flipper-0.11.0.beta9 lib/flipper/type.rb
flipper-0.11.0.beta8 lib/flipper/type.rb
flipper-0.11.0.beta7 lib/flipper/type.rb
flipper-0.11.0.beta6 lib/flipper/type.rb
flipper-0.11.0.beta5 lib/flipper/type.rb
flipper-0.11.0.beta4 lib/flipper/type.rb
flipper-0.11.0.beta3 lib/flipper/type.rb
flipper-0.11.0.beta1 lib/flipper/type.rb
flipper-0.10.2 lib/flipper/type.rb
flipper-0.10.1 lib/flipper/type.rb
flipper-0.10.0 lib/flipper/type.rb