Class: HttpStub::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- HttpStub::Server
- Defined in:
- lib/http_stub/server.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Server
constructor
A new instance of Server.
Constructor Details
#initialize ⇒ Server
Returns a new instance of Server.
9 10 11 12 13 14 15 16 |
# File 'lib/http_stub/server.rb', line 9 def initialize super() @stub_registry = HttpStub::Models::Registry.new("stub") @stub_activator_registry = HttpStub::Models::Registry.new("stub_activator") @stub_controller = HttpStub::Controllers::StubController.new(@stub_registry) @stub_activator_controller = HttpStub::Controllers::StubActivatorController.new(@stub_activator_registry, @stub_registry) end |
Class Method Details
.any_request_type(path, opts = {}, &block) ⇒ Object
22 23 24 |
# File 'lib/http_stub/server.rb', line 22 def self.any_request_type(path, opts={}, &block) SUPPORTED_REQUEST_TYPES.each { |type| self.send(type, path, opts, &block) } end |