Sha256: e2c6a82b74e368e2094f16bc080b42a958e5dd40025920ae97b9a48201d7ac44

Contents?: true

Size: 753 Bytes

Versions: 5

Compression:

Stored size: 753 Bytes

Contents

# frozen_string_literal: true

class GoalAchievement
  attr_accessor :name, :achieved_at, :properties

  def initialize(name = nil, achieved_at = nil, properties = nil)
    @name = name
    @achieved_at = achieved_at
    @properties = properties
  end

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

    that = o
    @name == that.name && @achieved_at == that.achieved_at &&
      @properties == that.properties
  end

  def hash_code
    { name: @name, achieved_at: @achieved_at, properties: @properties }
  end

  def to_s
    "GoalAchievement{" +
      "name='#{@name}'" +
      ", achieved_at='#{@achieved_at}'" +
      ", properties='#{@properties.inspect}'" +
      "}"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
absmartly-sdk-1.1.2 lib/json/goal_achievement.rb
absmartly-sdk-1.1.1 lib/json/goal_achievement.rb
absmartly-sdk-1.1.0 lib/json/goal_achievement.rb
absmartly-sdk-1.0.8 lib/json/goal_achievement.rb
absmartly-sdk-1.0.7 lib/json/goal_achievement.rb