Class: Metasploit::Framework::DataService::RemoteHTTPDataService::ResponseWrapper
- Inherits:
-
Object
- Object
- Metasploit::Framework::DataService::RemoteHTTPDataService::ResponseWrapper
- Defined in:
- lib/metasploit/framework/data_service/remote/http/core.rb
Overview
Simple response wrapper
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseWrapper
constructor
A new instance of ResponseWrapper.
- #response_body ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(response) ⇒ ResponseWrapper
Returns a new instance of ResponseWrapper.
247 248 249 |
# File 'lib/metasploit/framework/data_service/remote/http/core.rb', line 247 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
245 246 247 |
# File 'lib/metasploit/framework/data_service/remote/http/core.rb', line 245 def response @response end |
Instance Method Details
#response_body ⇒ Object
251 252 253 254 255 256 257 |
# File 'lib/metasploit/framework/data_service/remote/http/core.rb', line 251 def response_body if @response @response.body else nil end end |
#to_s ⇒ Object
259 260 261 262 263 264 265 |
# File 'lib/metasploit/framework/data_service/remote/http/core.rb', line 259 def to_s if @response @response.to_s else '' end end |