You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that if you get the list of probes using Pingdom::Probe and a probe listing has "active" => false, the method missing look up fails. I could not figure out why myself.
Here's an example. It turned ou in my case the first probe had actve set to false, the second probe had it true. So when I try to access the active method on the first one, I get an exception, but I can access all the other attributes/methods fine. Here I show accessing the ip method and then failing on active.
client = Pingdom::Client.new :username => u, :password => p, :key => k
probes = client.probes
puts probes[0].inspect #=> #<Pingdom::Probe id: 17 country: "Sweden" city: "Stockholm" name: "Stockholm, Sweden" active: false hostname: "s238.pingdom.com" ip: "83.140.19.38" countryiso: "SE">
puts probes[0].ip #=> 83.140.19.38
puts probes[0].active #=> NoMethodError: undefined method `active' for #<Pingdom::Probe:0x000001022eb0f0>
from /Users/rberger/.rvm/gems/ruby-1.9.2-p290/gems/pingdom-client-0.0.6.alpha/lib/pingdom/base.rb:26:in `method_missing'
from (irb):32
from /Users/rberger/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>'
And on the second probe where active is true I can access all the attributes including active:
It seems that if you get the list of probes using Pingdom::Probe and a probe listing has "active" => false, the method missing look up fails. I could not figure out why myself.
Here's an example. It turned ou in my case the first probe had actve set to false, the second probe had it true. So when I try to access the active method on the first one, I get an exception, but I can access all the other attributes/methods fine. Here I show accessing the ip method and then failing on active.
And on the second probe where active is true I can access all the attributes including active:
The text was updated successfully, but these errors were encountered: