Class: QuickServe::Rails::Snapshot

Inherits:
Object
  • Object
show all
Defined in:
lib/quick_serve/rails/snapshot.rb

Constant Summary collapse

@@snapshots =
{}

Class Method Summary collapse

Class Method Details

.dumpObject

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

.resetObject

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