Class: Handsoap::Http::Response
- Inherits:
-
Part
- Object
- Part
- Handsoap::Http::Response
- Defined in:
- lib/handsoap/http/response.rb
Overview
Represents a HTTP Response.
Instance Attribute Summary (collapse)
-
- (Object) status
readonly
Returns the value of attribute status.
Attributes inherited from Part
Instance Method Summary (collapse)
-
- (Response) initialize(status, headers, body, parts = nil)
constructor
A new instance of Response.
- - (Object) primary_part
Methods inherited from Part
#[], #charset, #inspect, #mime_type, #multipart?
Constructor Details
- (Response) initialize(status, headers, body, parts = nil)
A new instance of Response
10 11 12 13 |
# File 'lib/handsoap/http/response.rb', line 10 def initialize(status, headers, body, parts = nil) @status = status.to_i super(headers, body, parts) end |
Instance Attribute Details
- (Object) status (readonly)
Returns the value of attribute status
9 10 11 |
# File 'lib/handsoap/http/response.rb', line 9 def status @status end |
Instance Method Details
- (Object) primary_part
14 15 16 17 18 19 20 21 |
# File 'lib/handsoap/http/response.rb', line 14 def primary_part # Strictly speaking, the main part doesn't need to be first, but until proven otherwise, we'll just assume that. if multipart? parts.first else self end end |