Sha256: 45beb3ec12459950aaf79632117345df5ea53a9ac289b83aedc4ef11916d568f

Contents?: true

Size: 1.32 KB

Versions: 8

Compression:

Stored size: 1.32 KB

Contents

# frozen_string_literal: true

module ConvenientService
  module Support
    class Cache
      module Entities
        module Caches
          class Array < Caches::Base
            module Entities
              class Pair
                ##
                # @!attribute [r] key
                #   @return [ConvenientService::Support::Cache::Entities::Key]
                #
                attr_reader :key

                ##
                # @!attribute [rw] value
                #   @return [Object] Can be any type.
                #
                attr_reader :value

                ##
                # @param key [Object] Can be any type.
                # @param value [Object] Can be any type.
                # @return [void]
                #
                def initialize(key:, value:)
                  @key = key
                  @value = value
                end

                ##
                # @param other [Object] Can be any type.
                # @return [void]
                #
                def ==(other)
                  return unless other.instance_of?(self.class)

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

                  true
                end
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
convenient_service-0.19.0 lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
convenient_service-0.18.0 lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
convenient_service-0.17.0 lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
convenient_service-0.16.0 lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
convenient_service-0.15.0 lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
convenient_service-0.14.0 lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
convenient_service-0.13.0 lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb