Class: HttpMonkey::Cookie::MemoryStore
- Inherits:
-
Object
- Object
- HttpMonkey::Cookie::MemoryStore
- Defined in:
- lib/http_monkey/cookie.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ MemoryStore
constructor
A new instance of MemoryStore.
- #inspect ⇒ Object
- #read(key) ⇒ Object
- #write(key, value) ⇒ Object
Constructor Details
#initialize ⇒ MemoryStore
Returns a new instance of MemoryStore.
16 17 18 |
# File 'lib/http_monkey/cookie.rb', line 16 def initialize @store = Hash.new end |
Class Method Details
.instance ⇒ Object
12 13 14 |
# File 'lib/http_monkey/cookie.rb', line 12 def self.instance @@me ||= self.new end |
Instance Method Details
#inspect ⇒ Object
28 29 30 |
# File 'lib/http_monkey/cookie.rb', line 28 def inspect @store.inspect end |
#read(key) ⇒ Object
24 25 26 |
# File 'lib/http_monkey/cookie.rb', line 24 def read(key) @store[key] end |
#write(key, value) ⇒ Object
20 21 22 |
# File 'lib/http_monkey/cookie.rb', line 20 def write(key, value) @store[key] = value end |