Sha256: 28f0f5bbb31a93455b5c0d91f8fb8c3ceab80e74dff4712b6fd76b44fe20d295

Contents?: true

Size: 576 Bytes

Versions: 10

Compression:

Stored size: 576 Bytes

Contents

class MetricsEvent

  attr_accessor :feature_config, :target, :variation

  def initialize(feature_config, target, variation)

    @target = target
    @variation = variation
    @feature_config = feature_config
    freeze
  end

  def ==(other)
    eql?(other)
  end

  def eql?(other)
    feature_config.feature == other.feature_config.feature and
      variation.identifier == other.variation.identifier and
      target.identifier == other.target.identifier
  end

  def hash
    feature_config.feature.hash | variation.identifier.hash | target.identifier.hash
  end


end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
ff-ruby-server-sdk-1.4.0 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.3.2 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.3.1 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.2.1 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.2.0 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.1.4 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.1.3 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.1.2 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.1.1 lib/ff/ruby/server/sdk/api/metrics_event.rb
ff-ruby-server-sdk-1.1.0 lib/ff/ruby/server/sdk/api/metrics_event.rb