Sha256: 2f5a053043ac651b1b8cf74d62cdb00d05daaaa233e2416c980bb6a258b3c47d

Contents?: true

Size: 1002 Bytes

Versions: 3

Compression:

Stored size: 1002 Bytes

Contents

# frozen_string_literal: true

class PublishEvent
  attr_accessor :hashed, :units, :published_at, :exposures, :goals, :attributes

  def initialize
    @published_at = 0
    @hashed = false
  end

  def ==(o)
    return true if self.object_id == o.object_id
    return false if o.nil? || self.class != o.class

    that = o
    @hashed == that.hashed && @units == that.units &&
      @published_at == that.published_at && @exposures == that.exposures &&
      @goals == that.goals && @attributes == that.attributes
  end

  def hash_code
    {
      hashed: @hashed,
      units: @units,
      published_at: @published_at,
      exposures: @exposures,
      goals: @goals,
      attributes: @attributes
    }
  end

  def to_s
    "PublishEvent{" +
      "hashedUnits=" + @hashed +
      ", units=" + @units.inspect +
      ", publishedAt=" + @published_at +
      ", exposures=" + @exposures.inspect +
      ", goals=" + @goals.inspect +
      ", attributes=" + @attributes.join +
      "}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
absmartly-sdk-1.0.6 lib/json/publish_event.rb
absmartly-sdk-1.0.5 lib/json/publish_event.rb
absmartly-sdk-0.1.2 lib/json/publish_event.rb