Sha256: 9d4e4d7333e5ebe4fe5ae201cab09145564926fdd3483ba67c51ffaf1af38c20

Contents?: true

Size: 646 Bytes

Versions: 12

Compression:

Stored size: 646 Bytes

Contents

module Determinator
  class FixedDetermination
    attr_reader :name, :feature_on, :variant, :constraints

    def initialize(feature_on:, variant:, name: '', constraints: {})
      @name = name
      @feature_on = feature_on
      @variant = variant
      @constraints = constraints
    end

    def inspect
      "<feature_on: #{feature_on}, variant: #{variant}, constraints: #{constraints}"
    end

    def to_explain_params
      { name: name }
    end

    def ==(other)
      return false unless other.is_a?(self.class)
      other.feature_on == feature_on && other.variant == variant && other.constraints == constraints
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
determinator-2.9.3 lib/determinator/fixed_determination.rb
determinator-2.9.2 lib/determinator/fixed_determination.rb
determinator-2.9.1 lib/determinator/fixed_determination.rb
determinator-2.9.0 lib/determinator/fixed_determination.rb
determinator-2.8.0 lib/determinator/fixed_determination.rb
determinator-2.7.1 lib/determinator/fixed_determination.rb
determinator-2.7.0 lib/determinator/fixed_determination.rb
determinator-2.6.0 lib/determinator/fixed_determination.rb
determinator-2.5.4 lib/determinator/fixed_determination.rb
determinator-2.5.3 lib/determinator/fixed_determination.rb
determinator-2.5.2 lib/determinator/fixed_determination.rb
determinator-2.5.1 lib/determinator/fixed_determination.rb