Class: Mudis::LRUNode

Inherits:
Object
  • Object
show all
Defined in:
lib/mudis/lru.rb

Overview

Node structure for the LRU doubly-linked list

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyObject

Returns the value of attribute key.



6
7
8
# File 'lib/mudis/lru.rb', line 6

def key
  @key
end

#nextObject

Returns the value of attribute next.



6
7
8
# File 'lib/mudis/lru.rb', line 6

def next
  @next
end

#prevObject

Returns the value of attribute prev.



6
7
8
# File 'lib/mudis/lru.rb', line 6

def prev
  @prev
end