Sha256: 7ea1fa51560bf9328decb5a9d14de53cc0e2b3186380f17adb4a5e4548115636

Contents?: true

Size: 604 Bytes

Versions: 3

Compression:

Stored size: 604 Bytes

Contents

# frozen_string_literal: true

class CustomFieldValue
  attr_accessor :name, :type, :value

  def initialize(name, value, type)
    @name = name
    @type = type
    @value = value
  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 && @type == that.type  && @value == that.value
  end

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

  def to_s
    "CustomFieldValue{" +
      "name='#{@name}'" +
      ", type='#{@type}'" +
      ", value='#{@value}'" +
      "}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
absmartly-sdk-1.1.2 lib/json/custom_field_value.rb
absmartly-sdk-1.1.1 lib/json/custom_field_value.rb
absmartly-sdk-1.1.0 lib/json/custom_field_value.rb