class Poller::HTTP::HttpPoller

Public Class Methods

new(url, matcher, timeout_seconds, period_seconds, proxy = nil) click to toggle source
Calls superclass method Poller::Poller::new
# File lib/poller/http/http_poller.rb, line 20
def initialize(url, matcher, timeout_seconds, period_seconds, proxy = nil)
  proxy = OpenStruct.new(proxy) if proxy.is_a?(Hash)
  probe = proxy.nil? \
    ? HttpProbe.new(url, matcher) \
    : HttpProbe.new(url, matcher, proxy.hostname, proxy.port, proxy.user, proxy.password)
  super(probe, timeout_seconds, period_seconds, url)
end