Class: HTTPSpec::Clients::Webmachine
- Inherits:
-
Object
- Object
- HTTPSpec::Clients::Webmachine
- Defined in:
- lib/http_spec/clients/webmachine.rb
Instance Method Summary collapse
- #dispatch(request) ⇒ Object
-
#initialize(app) ⇒ Webmachine
constructor
A new instance of Webmachine.
Constructor Details
#initialize(app) ⇒ Webmachine
Returns a new instance of Webmachine.
7 8 9 |
# File 'lib/http_spec/clients/webmachine.rb', line 7 def initialize(app) @dispatcher = app.dispatcher end |
Instance Method Details
#dispatch(request) ⇒ Object
11 12 13 14 15 |
# File 'lib/http_spec/clients/webmachine.rb', line 11 def dispatch(request) response = ::Webmachine::Response.new @dispatcher.dispatch(to_webmachine(request), response) from_webmachine response end |