Class: ForemanMaintain::Utils::CurlResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/foreman_maintain/utils/curl_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_msgObject (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_codeObject (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

#resultObject (readonly)

Returns the value of attribute result.



4
5
6
# File 'lib/foreman_maintain/utils/curl_response.rb', line 4

def result
  @result
end