Class: Sandthorn::SnapshotStore

Inherits:
Object
  • Object
show all
Defined in:
lib/sandthorn/snapshot_store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSnapshotStore

Returns a new instance of SnapshotStore.



3
4
5
# File 'lib/sandthorn/snapshot_store.rb', line 3

def initialize
  @store = Hash.new
end

Instance Attribute Details

#storeObject (readonly)

Returns the value of attribute store.



7
8
9
# File 'lib/sandthorn/snapshot_store.rb', line 7

def store
  @store
end

Instance Method Details

#find(key) ⇒ Object



13
14
15
# File 'lib/sandthorn/snapshot_store.rb', line 13

def find key
  @store[key]
end

#save(key, value) ⇒ Object



9
10
11
# File 'lib/sandthorn/snapshot_store.rb', line 9

def save key, value
  @store[key] = value
end