Class: Handsoap::Http::Response
- Defined in:
- lib/handsoap/http/response.rb
Overview
Represents a HTTP Response.
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from Part
Instance Method Summary collapse
-
#initialize(status, headers, body, parts = nil) ⇒ Response
constructor
A new instance of Response.
- #primary_part ⇒ Object
Methods inherited from Part
#[], #charset, #inspect, #mime_type, #multipart?
Constructor Details
#initialize(status, headers, body, parts = nil) ⇒ Response
Returns 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
#status ⇒ Object (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
#primary_part ⇒ Object
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 |