Class: Mu::Curl::Verify::Result
- Inherits:
-
Object
- Object
- Mu::Curl::Verify::Result
- Defined in:
- lib/mu/curl/verify.rb
Instance Attribute Summary collapse
-
#connect ⇒ Object
readonly
Returns the value of attribute connect.
-
#duration ⇒ Object
readonly
Returns the value of attribute duration.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(json) ⇒ Result
constructor
A new instance of Result.
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
#connect ⇒ Object (readonly)
Returns the value of attribute connect.
63 64 65 |
# File 'lib/mu/curl/verify.rb', line 63 def connect @connect end |
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
62 63 64 |
# File 'lib/mu/curl/verify.rb', line 62 def duration @duration end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
61 62 63 |
# File 'lib/mu/curl/verify.rb', line 61 def region @region end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
64 65 66 |
# File 'lib/mu/curl/verify.rb', line 64 def request @request end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
65 66 67 |
# File 'lib/mu/curl/verify.rb', line 65 def response @response end |