Class: Wee::LRUCache::Item

Inherits:
Struct show all
Defined in:
lib/wee/lru_cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from StructSnapshotMixin

#restore_snapshot, #take_snapshot

Instance Attribute Details

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



7
8
9
# File 'lib/wee/lru_cache.rb', line 7

def time
  @time
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



7
8
9
# File 'lib/wee/lru_cache.rb', line 7

def value
  @value
end

Instance Method Details

#<=>(other) ⇒ Object



8
9
10
# File 'lib/wee/lru_cache.rb', line 8

def <=>(other)
  self.time <=> other.time
end