Sha256: c3531a3c26e2867cc5eb584e92ae8456a0f37c7ae54040f4ed053ae4f8ea1440

Contents?: true

Size: 478 Bytes

Versions: 37

Compression:

Stored size: 478 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'erb'

module SiteValidator
  module Reporter
    extend self

    ##
    # Create the html report for the sitemap
    def generate_html(sitemap, filename)
      template = ERB.new(open(File.dirname(__FILE__)+'/templates/site_validator.html.erb').read)

      File.open(filename, 'w') do |f|
        f.write(template.result(sitemap.get_binding))
      end
    rescue Exception => e
      puts "ERROR generating report: #{e}"
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
site_validator-2.1.2 lib/site_validator/reporter.rb
site_validator-2.1.1 lib/site_validator/reporter.rb
site_validator-2.1.0 lib/site_validator/reporter.rb
site_validator-2.0.0 lib/site_validator/reporter.rb
site_validator-1.7.4 lib/site_validator/reporter.rb
site_validator-1.7.3 lib/site_validator/reporter.rb
site_validator-1.7.2 lib/site_validator/reporter.rb
site_validator-1.7.1 lib/site_validator/reporter.rb
site_validator-1.7.0 lib/site_validator/reporter.rb
site_validator-1.6.0 lib/site_validator/reporter.rb
site_validator-1.5.0 lib/site_validator/reporter.rb
site_validator-1.4.1 lib/site_validator/reporter.rb
site_validator-1.3.11 lib/site_validator/reporter.rb
site_validator-1.3.10 lib/site_validator/reporter.rb
site_validator-1.3.9 lib/site_validator/reporter.rb
site_validator-1.3.8 lib/site_validator/reporter.rb
site_validator-1.3.7 lib/site_validator/reporter.rb
site_validator-1.3.6 lib/site_validator/reporter.rb
site_validator-1.3.5 lib/site_validator/reporter.rb
site_validator-1.3.4 lib/site_validator/reporter.rb