Class: Nestene::MemoryStorage

Inherits:
Object
  • Object
show all
Defined in:
lib/nestene/storage.rb

Instance Method Summary collapse

Constructor Details

#initializeMemoryStorage

Returns a new instance of MemoryStorage.



55
56
57
# File 'lib/nestene/storage.rb', line 55

def initialize
  @storage = {}
end

Instance Method Details

#listObject



59
60
61
# File 'lib/nestene/storage.rb', line 59

def list
  @storage.keys
end

#load(key) ⇒ Object



63
64
65
# File 'lib/nestene/storage.rb', line 63

def load(key)
  @storage[key]
end

#store(key, value) ⇒ Object



67
68
69
# File 'lib/nestene/storage.rb', line 67

def store(key, value)
  @storage[key] = value
end