Class: GCoder::Storage::HeapAdapter
Instance Method Summary
collapse
Methods inherited from Adapter
#config, #initialize
Instance Method Details
#clear ⇒ Object
58
59
60
|
# File 'lib/gcoder/storage.rb', line 58
def clear
@heap = {}
end
|
#connect ⇒ Object
54
55
56
|
# File 'lib/gcoder/storage.rb', line 54
def connect
@heap = {}
end
|
#get(key) ⇒ Object
62
63
64
|
# File 'lib/gcoder/storage.rb', line 62
def get(key)
@heap[nkey(key)]
end
|
#set(key, value) ⇒ Object
66
67
68
|
# File 'lib/gcoder/storage.rb', line 66
def set(key, value)
@heap[nkey(key)] = nval(value)
end
|