Class: Pingdom::Result
Overview
“probeid”=>28, “responsetime”=>221, “statusdesc”=>“OK”, “status”=>“up”, “probedesc”=>“Amsterdam 2, Netherlands”
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
attributes, check_error!, #id, #initialize, #inspect, #method_missing, #respond_to?
Constructor Details
This class inherits a constructor from Pingdom::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Pingdom::Base
Class Method Details
.parse(client, response) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/pingdom/result.rb', line 5 def self.parse(client, response) results = super Array.wrap(results[:results] || results[:result]).map do |result| new(client, response, result) end end |
Instance Method Details
#probe ⇒ Object
15 16 17 |
# File 'lib/pingdom/result.rb', line 15 def probe @client.probes.detect{ |probe| probe.id == probe_id } end |