Class: HttpStub::Server::Memory::Memory
- Inherits:
-
Object
- Object
- HttpStub::Server::Memory::Memory
- Defined in:
- lib/http_stub/server/memory/memory.rb
Instance Attribute Summary collapse
-
#scenario_registry ⇒ Object
readonly
Returns the value of attribute scenario_registry.
-
#session_registry ⇒ Object
readonly
Returns the value of attribute session_registry.
-
#stubs ⇒ Object
readonly
Returns the value of attribute stubs.
Instance Method Summary collapse
-
#initialize(configurator_state) ⇒ Memory
constructor
A new instance of Memory.
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_registry ⇒ Object (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_registry ⇒ Object (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 |
#stubs ⇒ Object (readonly)
Returns the value of attribute stubs.
7 8 9 |
# File 'lib/http_stub/server/memory/memory.rb', line 7 def stubs @stubs end |