Class: Mu::Curl::Verify::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/mu/curl/verify.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Result

Returns a new instance of Result.



67
68
69
70
71
72
73
74
75
76
# File 'lib/mu/curl/verify.rb', line 67

def initialize json
    result = json['result']
    stats = result['statistics']
    
    @region = json['region']
    @duration = stats['duration']['avg']
    @connect = stats['steps'][0]['duration']['avg']
    @request = Request.new result
    @response = Response.new result
end

Instance Attribute Details

#connectObject (readonly)

Returns the value of attribute connect.



63
64
65
# File 'lib/mu/curl/verify.rb', line 63

def connect
  @connect
end

#durationObject (readonly)

Returns the value of attribute duration.



62
63
64
# File 'lib/mu/curl/verify.rb', line 62

def duration
  @duration
end

#regionObject (readonly)

Returns the value of attribute region.



61
62
63
# File 'lib/mu/curl/verify.rb', line 61

def region
  @region
end

#requestObject (readonly)

Returns the value of attribute request.



64
65
66
# File 'lib/mu/curl/verify.rb', line 64

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



65
66
67
# File 'lib/mu/curl/verify.rb', line 65

def response
  @response
end