Class: QuickServe::Rails::Snapshot
- Inherits:
-
Object
- Object
- QuickServe::Rails::Snapshot
- Defined in:
- lib/quick_serve/rails/snapshot.rb
Constant Summary collapse
- @@snapshots =
{}
Class Method Summary collapse
-
.dump ⇒ Object
return collection.
-
.fetch(key) ⇒ Object
fetch a snapshot stored under specified key.
-
.reset ⇒ Object
remove all snapshots.
-
.store(key, snapshot) ⇒ Object
store a snapshot under specified key.
Class Method Details
.dump ⇒ Object
return collection
8 9 10 |
# File 'lib/quick_serve/rails/snapshot.rb', line 8 def self.dump @@snapshots end |
.fetch(key) ⇒ Object
fetch a snapshot stored under specified key
23 24 25 |
# File 'lib/quick_serve/rails/snapshot.rb', line 23 def self.fetch(key) @@snapshots[key] end |
.reset ⇒ Object
remove all snapshots
13 14 15 |
# File 'lib/quick_serve/rails/snapshot.rb', line 13 def self.reset @@snapshots = {} end |
.store(key, snapshot) ⇒ Object
store a snapshot under specified key
18 19 20 |
# File 'lib/quick_serve/rails/snapshot.rb', line 18 def self.store(key, snapshot) @@snapshots[key] = snapshot end |