Class: HttpStub::Server::Stub::Registry

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

Instance Method Summary collapse

Constructor Details

#initialize(initial_stubs) ⇒ Registry

Returns a new instance of Registry.


11
12
13
14
# File 'lib/http_stub/server/stub/registry.rb', line 11

def initialize(initial_stubs)
  @initial_stubs = initial_stubs
  @stub_registry = HttpStub::Server::Registry.new("stub", initial_stubs)
end

Instance Method Details

#reset(logger) ⇒ Object


16
17
18
# File 'lib/http_stub/server/stub/registry.rb', line 16

def reset(logger)
  @stub_registry.replace(@initial_stubs, logger)
end