Class: Steam::Connection::Rails
- Inherits:
-
Object
- Object
- Steam::Connection::Rails
- Defined in:
- lib/steam/connection/rails.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize ⇒ Rails
constructor
A new instance of Rails.
- #response_body(response) ⇒ Object
Constructor Details
#initialize ⇒ Rails
Returns a new instance of Rails.
4 5 6 |
# File 'lib/steam/connection/rails.rb', line 4 def initialize @app = ActionController::Dispatcher.new end |
Instance Method Details
#call(env) ⇒ Object
8 9 10 11 |
# File 'lib/steam/connection/rails.rb', line 8 def call(env) status, headers, response = @app.call(env) Rack::Response.new(response_body(response), status, headers).to_a end |
#response_body(response) ⇒ Object
13 14 15 16 17 |
# File 'lib/steam/connection/rails.rb', line 13 def response_body(response) body = '' response.each { |part| body << part } # yuck body end |