Class: HttpStub::Server::Memory::Memory

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configurator_state) ⇒ Memory

Returns a new instance of Memory.


9
10
11
12
13
14
# File 'lib/http_stub/server/memory/memory.rb', line 9

def initialize(configurator_state)
  initial_state = HttpStub::Server::Memory::InitialState.new(configurator_state)
  @scenario_registry = HttpStub::Server::Scenario::Registry.new(initial_state.load_scenarios)
  @stubs             = initial_state.load_stubs(@scenario_registry)
  @session_registry  = HttpStub::Server::Session::Registry.new(@scenario_registry, @stubs)
end

Instance Attribute Details

#scenario_registryObject (readonly)

Returns the value of attribute scenario_registry


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

def scenario_registry
  @scenario_registry
end

#session_registryObject (readonly)

Returns the value of attribute session_registry


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

def session_registry
  @session_registry
end

#stubsObject (readonly)

Returns the value of attribute stubs


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

def stubs
  @stubs
end