Class: Webmachine::Adapters::Mongrel::RequestBody Private
- Inherits:
-
Object
- Object
- Webmachine::Adapters::Mongrel::RequestBody
- Defined in:
- lib/webmachine/adapters/mongrel.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wraps a Mongrel request body so that it can behave like a String.Instance Attribute Summary (collapse)
-
- (Object) request
readonly
Private
The request from Mongrel.
Instance Method Summary (collapse)
- - (Object) each {|chunk| ... } Private
-
- (RequestBody) initialize(request)
constructor
Private
A new instance of RequestBody.
-
- (String) to_s
Private
The request body as a string.
Constructor Details
- (RequestBody) initialize(request)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A new instance of RequestBody
93 94 95 |
# File 'lib/webmachine/adapters/mongrel.rb', line 93 def initialize(request) @request = request end |
Instance Attribute Details
- (Object) request (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The request from Mongrel
90 91 92 |
# File 'lib/webmachine/adapters/mongrel.rb', line 90 def request @request end |
Instance Method Details
- (Object) each {|chunk| ... }
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
105 106 107 |
# File 'lib/webmachine/adapters/mongrel.rb', line 105 def each(&block) request.body.each(&block) end |
- (String) to_s
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The request body as a string
98 99 100 101 |
# File 'lib/webmachine/adapters/mongrel.rb', line 98 def to_s request.body.rewind request.body.read end |