Sha256: 30b8bed2432102793301b16bc36d9b068e432cc41da5421c95aa62b6617c2c32

Contents?: true

Size: 600 Bytes

Versions: 5

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

class Attribute
  attr_accessor :name, :value, :set_at

  def initialize(name = nil, value = nil, set_at = nil)
    @name = name
    @value = value
    @set_at = set_at
  end

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

    @name == o.name && @value == o.value && @set_at == o.set_at
  end

  def hash_code
    { name: @name, value: @value, set_at: @set_at }
  end

  def to_s
    "Attribute{" +
      "name='#{@name}'" +
      ", value=#{@value}" +
      ", setAt=#{@set_at}" +
      "}"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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