Class: Mudis::LRUNode
- Inherits:
-
Object
- Object
- Mudis::LRUNode
- Defined in:
- lib/mudis.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
136 137 138 139 140 |
# File 'lib/mudis.rb', line 136 def initialize(key) @key = key @prev = nil @next = nil end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
134 135 136 |
# File 'lib/mudis.rb', line 134 def key @key end |
#next ⇒ Object
Returns the value of attribute next.
134 135 136 |
# File 'lib/mudis.rb', line 134 def next @next end |
#prev ⇒ Object
Returns the value of attribute prev.
134 135 136 |
# File 'lib/mudis.rb', line 134 def prev @prev end |