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-1.3.3 lib/site_validator/reporter.rb
site_validator-1.3.2 lib/site_validator/reporter.rb
site_validator-1.3.1 lib/site_validator/reporter.rb
site_validator-1.3.0 lib/site_validator/reporter.rb
site_validator-1.2.5 lib/site_validator/reporter.rb
site_validator-1.2.4 lib/site_validator/reporter.rb
site_validator-1.2.3 lib/site_validator/reporter.rb
site_validator-1.2.2 lib/site_validator/reporter.rb
site_validator-1.2.1 lib/site_validator/reporter.rb
site_validator-1.2.0 lib/site_validator/reporter.rb
site_validator-1.1.1 lib/site_validator/reporter.rb
site_validator-1.1.0 lib/site_validator/reporter.rb
site_validator-1.0.4 lib/site_validator/reporter.rb
site_validator-1.0.3 lib/site_validator/reporter.rb
site_validator-1.0.2 lib/site_validator/reporter.rb
site_validator-1.0.1 lib/site_validator/reporter.rb
site_validator-1.0.0 lib/site_validator/reporter.rb