Class: Sandthorn::SnapshotStore
- Inherits:
-
Object
- Object
- Sandthorn::SnapshotStore
- Defined in:
- lib/sandthorn/snapshot_store.rb
Instance Attribute Summary collapse
-
#store ⇒ Object
readonly
Returns the value of attribute store.
Instance Method Summary collapse
- #find(key) ⇒ Object
-
#initialize ⇒ SnapshotStore
constructor
A new instance of SnapshotStore.
- #save(key, value) ⇒ Object
Constructor Details
#initialize ⇒ SnapshotStore
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
#store ⇒ Object (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 |