Class: HttpStub::Server::Session::Controller

Inherits:
Object
  • Object
show all
Defined in:
lib/http_stub/server/session/controller.rb

Instance Method Summary collapse

Constructor Details

#initialize(server_memory) ⇒ Controller

Returns a new instance of Controller.


7
8
9
# File 'lib/http_stub/server/session/controller.rb', line 7

def initialize(server_memory)
  @server_memory = server_memory
end

Instance Method Details

#clear(logger) ⇒ Object


27
28
29
# File 'lib/http_stub/server/session/controller.rb', line 27

def clear(logger)
  @server_memory.session_registry.clear(logger)
end

#delete(request, logger) ⇒ Object


23
24
25
# File 'lib/http_stub/server/session/controller.rb', line 23

def delete(request, logger)
  @server_memory.session_registry.delete(request.session_id, logger)
end

#find(request, logger) ⇒ Object


11
12
13
# File 'lib/http_stub/server/session/controller.rb', line 11

def find(request, logger)
  @server_memory.session_registry.find(request.session_id, logger)
end

#find_allObject


19
20
21
# File 'lib/http_stub/server/session/controller.rb', line 19

def find_all
  @server_memory.session_registry.all
end

#find_transactional(logger) ⇒ Object


15
16
17
# File 'lib/http_stub/server/session/controller.rb', line 15

def find_transactional(logger)
  @server_memory.session_registry.find(HttpStub::Server::Session::TRANSACTIONAL_SESSION_ID, logger)
end