Class: HttpMonkey::Cookie::MemoryStore

Inherits:
Object
  • Object
show all
Defined in:
lib/http_monkey/cookie.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMemoryStore

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

.instanceObject



12
13
14
# File 'lib/http_monkey/cookie.rb', line 12

def self.instance
  @@me ||= self.new
end

Instance Method Details

#inspectObject



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