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.



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

def initialize
  @storage = {}
end

Instance Method Details

#listObject



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

def list
  @storage.keys
end

#load(key) ⇒ Object



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

def load(key)
  @storage[key]
end

#store(key, value) ⇒ Object



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

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