class DownloadTV::LinkGrabber
def online?
def online? @agent.read_timeout = 2 url = if @url.include? '%s' format(@url, 'test') else @url end @agent.head(url) true rescue Mechanize::ResponseCodeError, Net::HTTP::Persistent::Error false end
def online? @agent.read_timeout = 2 url = if @url.include? '%s' format(@url, 'test') else @url end @agent.head(url) true rescue Mechanize::ResponseCodeError, Net::HTTP::Persistent::Error false end