Class: HttpStub::Server::Application
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- HttpStub::Server::Application
- Defined in:
- lib/http_stub/server/application.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Application
constructor
A new instance of Application.
Constructor Details
#initialize ⇒ Application
Returns a new instance of Application.
12 13 14 15 16 17 18 19 |
# File 'lib/http_stub/server/application.rb', line 12 def initialize super() @match_registry = HttpStub::Server::Registry.new("match") @stub_registry = HttpStub::Server::Stub::Registry.new(@match_registry) @scenario_registry = HttpStub::Server::Registry.new("scenario") @stub_controller = HttpStub::Server::Stub::Controller.new(@stub_registry) @scenario_controller = HttpStub::Server::Scenario::Controller.new(@scenario_registry, @stub_registry) end |
Class Method Details
.any_request_type(path, opts = {}, &block) ⇒ Object
25 26 27 |
# File 'lib/http_stub/server/application.rb', line 25 def self.any_request_type(path, opts={}, &block) SUPPORTED_REQUEST_TYPES.each { |type| self.send(type, path, opts, &block) } end |