Class: Handsoap::Http::Response
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.
114 115 116 117 |
# File 'lib/handsoap/http.rb', line 114 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.
113 114 115 |
# File 'lib/handsoap/http.rb', line 113 def status @status end |
Instance Method Details
#primary_part ⇒ Object
118 119 120 121 122 123 124 125 |
# File 'lib/handsoap/http.rb', line 118 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 |