Class: ConvenientService::Support::Cache::Entities::Caches::Array::Entities::Pair
- Inherits:
-
Object
- Object
- ConvenientService::Support::Cache::Entities::Caches::Array::Entities::Pair
- Defined in:
- lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #==(other) ⇒ void
- #initialize(key:, value:) ⇒ void constructor
Constructor Details
#initialize(key:, value:) ⇒ void
28 29 30 31 |
# File 'lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb', line 28 def initialize(key:, value:) @key = key @value = value end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
15 16 17 |
# File 'lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb', line 15 def key @key end |
#value ⇒ Object
Returns the value of attribute value.
21 22 23 |
# File 'lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb', line 21 def value @value end |
Instance Method Details
#==(other) ⇒ void
This method returns an undefined value.
37 38 39 40 41 42 43 44 |
# File 'lib/convenient_service/support/cache/entities/caches/array/entities/pair.rb', line 37 def ==(other) return unless other.instance_of?(self.class) return false if key != other.key return false if value != other.value true end |