Class: Pingdom::TMSSummary::Average
- Defined in:
- lib/pingdom/tms_summary/average.rb
Overview
summary.average includeuptime
"responsetime"=>{
"#"=>[
{"avgresponse"=>994,
"avgresponse"=>6
],
"avgresponse"=>1000,"from"=>0, "to"=>1500000000
},
"status"=>"totalunknown"=>1293069551, "totaldown"=>5078
}
Defined Under Namespace
Classes: Ingredient
Class Method Summary collapse
Instance Method Summary collapse
- #ingredients ⇒ Object (also: #per_ingredient)
Methods inherited from Base
attributes, check_error!, #id, #initialize, #inspect, #method_missing, #respond_to?, #respond_to_missing?
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
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/pingdom/tms_summary/average.rb', line 25 def self.parse(client, response) body = super["summary"] sum = body["responsetime"] sum["status"] = Status.new(client, response, body["status"]) if body.key?("status") sum["responsetime"] = sum.delete("avgresponse") new(client, response, sum) end |
Instance Method Details
#ingredients ⇒ Object Also known as: per_ingredient
36 37 38 |
# File 'lib/pingdom/tms_summary/average.rb', line 36 def ingredients @attributes["#"].map { |ingredient| Ingredient.new @client, ingredient } end |