Class: Upkeep::Capture::RequestResult

Inherits:
Data
  • Object
show all
Defined in:
lib/upkeep/capture/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#action_resultObject (readonly)

Returns the value of attribute action_result

Returns:

  • (Object)

    the current value of action_result



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def action_result
  @action_result
end

#countersObject (readonly)

Returns the value of attribute counters

Returns:

  • (Object)

    the current value of counters



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def counters
  @counters
end

#htmlObject (readonly)

Returns the value of attribute html

Returns:

  • (Object)

    the current value of html



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def html
  @html
end

#recorderObject (readonly)

Returns the value of attribute recorder

Returns:

  • (Object)

    the current value of recorder



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def recorder
  @recorder
end

#response_content_typeObject (readonly)

Returns the value of attribute response_content_type

Returns:

  • (Object)

    the current value of response_content_type



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def response_content_type
  @response_content_type
end

#response_media_typeObject (readonly)

Returns the value of attribute response_media_type

Returns:

  • (Object)

    the current value of response_media_type



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def response_media_type
  @response_media_type
end

#response_statusObject (readonly)

Returns the value of attribute response_status

Returns:

  • (Object)

    the current value of response_status



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def response_status
  @response_status
end

#response_successfulObject (readonly)

Returns the value of attribute response_successful

Returns:

  • (Object)

    the current value of response_successful



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def response_successful
  @response_successful
end

#signatureObject (readonly)

Returns the value of attribute signature

Returns:

  • (Object)

    the current value of signature



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def signature
  @signature
end

#timingsObject (readonly)

Returns the value of attribute timings

Returns:

  • (Object)

    the current value of timings



7
8
9
# File 'lib/upkeep/capture/request.rb', line 7

def timings
  @timings
end

Instance Method Details

#html_response?Boolean

Returns:

  • (Boolean)


23
24
25
26
# File 'lib/upkeep/capture/request.rb', line 23

def html_response?
  response_media_type == "text/html" ||
    response_content_type.to_s.start_with?("text/html")
end

#successful?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/upkeep/capture/request.rb', line 19

def successful?
  !!response_successful
end