Class: Susuwatari::Result
- Inherits:
-
Object
- Object
- Susuwatari::Result
- Extended by:
- Forwardable
- Defined in:
- lib/susuwatari/result.rb
Constant Summary collapse
- STATUS_URL =
'http://www.webpagetest.org/testStatus.php'
- RESULT_URL_PREFIX =
'http://www.webpagetest.org/xmlResult/'
Instance Attribute Summary collapse
-
#current_status ⇒ Object
readonly
Returns the value of attribute current_status.
-
#request_raw ⇒ Object
readonly
Returns the value of attribute request_raw.
-
#test_id ⇒ Object
readonly
Returns the value of attribute test_id.
-
#test_result ⇒ Object
readonly
Returns the value of attribute test_result.
Instance Method Summary collapse
-
#initialize(request_response) ⇒ Result
constructor
A new instance of Result.
- #status ⇒ Object
Constructor Details
#initialize(request_response) ⇒ Result
Returns a new instance of Result.
17 18 19 20 |
# File 'lib/susuwatari/result.rb', line 17 def initialize( request_response ) @request_raw = request_response @test_id = request_raw.data.testId end |
Instance Attribute Details
#current_status ⇒ Object (readonly)
Returns the value of attribute current_status.
13 14 15 |
# File 'lib/susuwatari/result.rb', line 13 def current_status @current_status end |
#request_raw ⇒ Object (readonly)
Returns the value of attribute request_raw.
13 14 15 |
# File 'lib/susuwatari/result.rb', line 13 def request_raw @request_raw end |
#test_id ⇒ Object (readonly)
Returns the value of attribute test_id.
13 14 15 |
# File 'lib/susuwatari/result.rb', line 13 def test_id @test_id end |
#test_result ⇒ Object (readonly)
Returns the value of attribute test_result.
13 14 15 |
# File 'lib/susuwatari/result.rb', line 13 def test_result @test_result end |
Instance Method Details
#status ⇒ Object
22 23 24 25 |
# File 'lib/susuwatari/result.rb', line 22 def status fetch_status unless current_status == :complete current_status end |