Class: Mudis::LRUNode
- Inherits:
-
Object
- Object
- Mudis::LRUNode
- Defined in:
- lib/mudis/lru.rb
Overview
Node structure for the LRU doubly-linked list
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#next ⇒ Object
Returns the value of attribute next.
-
#prev ⇒ Object
Returns the value of attribute prev.
Instance Method Summary collapse
-
#initialize(key) ⇒ LRUNode
constructor
A new instance of LRUNode.
Constructor Details
#initialize(key) ⇒ LRUNode
8 9 10 11 12 |
# File 'lib/mudis/lru.rb', line 8 def initialize(key) @key = key @prev = nil @next = nil end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
6 7 8 |
# File 'lib/mudis/lru.rb', line 6 def key @key end |
#next ⇒ Object
Returns the value of attribute next.
6 7 8 |
# File 'lib/mudis/lru.rb', line 6 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev.
6 7 8 |
# File 'lib/mudis/lru.rb', line 6 def prev @prev end |