Class: ConvenientService::Support::Cache::Entities::Caches::Array::Entities::Pair Private

Inherits:
Object
  • Object
show all
Defined in:
lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, value:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • key (Object)

    Can be any type.

  • value (Object)

    Can be any type.

Since:

  • 1.0.0



33
34
35
36
# File 'lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb', line 33

def initialize(key:, value:)
  @key = key
  @value = value
end

Instance Attribute Details

#keyObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



20
21
22
# File 'lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb', line 20

def key
  @key
end

#valueObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



26
27
28
# File 'lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb', line 26

def value
  @value
end

Instance Method Details

#==(other) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • other (Object)

    Can be any type.

Since:

  • 1.0.0



42
43
44
45
46
47
48
49
# File 'lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb', line 42

def ==(other)
  return unless other.instance_of?(self.class)

  return false if key != other.key
  return false if value != other.value

  true
end