Class: Peek::Adapters::Memory
Instance Attribute Summary collapse
-
#requests ⇒ Object
Returns the value of attribute requests.
Instance Method Summary collapse
- #get(request_id) ⇒ Object
-
#initialize(options = {}) ⇒ Memory
constructor
A new instance of Memory.
- #reset ⇒ Object
- #save(request_id) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Memory
Returns a new instance of Memory.
8 9 10 |
# File 'lib/peek/adapters/memory.rb', line 8 def initialize( = {}) @requests = {} end |
Instance Attribute Details
#requests ⇒ Object
Returns the value of attribute requests.
6 7 8 |
# File 'lib/peek/adapters/memory.rb', line 6 def requests @requests end |
Instance Method Details
#get(request_id) ⇒ Object
12 13 14 |
# File 'lib/peek/adapters/memory.rb', line 12 def get(request_id) @requests[request_id] end |
#reset ⇒ Object
22 23 24 |
# File 'lib/peek/adapters/memory.rb', line 22 def reset @requests.clear end |