Class: AegisNet::Sitemapper::Pinger

Inherits:
Object
  • Object
show all
Defined in:
lib/sitemapper/pinger.rb

Overview

:doc:

Class Method Summary collapse

Class Method Details

.ping!Object


9
10
11
12
13
14
15
16
17
# File 'lib/sitemapper/pinger.rb', line 9

def self.ping!
  config = AegisNet::Sitemapper::Loader.load_config
  if config[:ping] and config[:default_host] and config[:index]
    config[:pings].each do |ping_url|
      url = ping_url + config[:default_host] + "/" + config[:index]["sitemapfile"]
      Net::HTTP.get_response(URI.parse(url)) rescue nil
    end
  end
end