Class: HTTPSpec::Clients::Webmachine

Inherits:
Object
  • Object
show all
Defined in:
lib/http_spec/clients/webmachine.rb

Instance Method Summary collapse

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