class ForemanMaintain::Utils::CurlResponse

Attributes

error_msg[R]
http_code[R]
result[R]

Public Class Methods

new(response, http_code, http_error_msg) click to toggle source
# 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

Private Instance Methods

generate_error_msg(msg_string) click to toggle source
# File lib/foreman_maintain/utils/curl_response.rb, line 14
      def generate_error_msg(msg_string)
        <<-EOF
        \n#{msg_string} #{http_code}. Response: #{result.inspect}
        EOF
      end