Class: ForemanMaintain::Utils::CurlResponse
- Inherits:
-
Object
- Object
- ForemanMaintain::Utils::CurlResponse
- Defined in:
- lib/foreman_maintain/utils/curl_response.rb
Instance Attribute Summary collapse
-
#error_msg ⇒ Object
readonly
Returns the value of attribute error_msg.
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(response, http_code, http_error_msg) ⇒ CurlResponse
constructor
A new instance of CurlResponse.
Constructor Details
#initialize(response, http_code, http_error_msg) ⇒ CurlResponse
Returns a new instance of CurlResponse.
6 7 8 9 10 |
# File 'lib/foreman_maintain/utils/curl_response.rb', line 6 def initialize(response, http_code, http_error_msg) @result = response || '' @http_code = http_code @error_msg = generate_error_msg(http_error_msg) end |
Instance Attribute Details
#error_msg ⇒ Object (readonly)
Returns the value of attribute error_msg.
4 5 6 |
# File 'lib/foreman_maintain/utils/curl_response.rb', line 4 def error_msg @error_msg end |
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
4 5 6 |
# File 'lib/foreman_maintain/utils/curl_response.rb', line 4 def http_code @http_code end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
4 5 6 |
# File 'lib/foreman_maintain/utils/curl_response.rb', line 4 def result @result end |