Module: W3Clove::Reporter
Instance Method Summary collapse
-
#generate_html(sitemap, filename) ⇒ Object
Create the html report for the sitemap.
Instance Method Details
#generate_html(sitemap, filename) ⇒ Object
Create the html report for the sitemap
11 12 13 14 15 16 17 18 19 |
# File 'lib/w3clove/reporter.rb', line 11 def generate_html(sitemap, filename) template = ERB.new(open(File.dirname(__FILE__)+'/templates/w3clove.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 |