# File lib/puppet/reports/rrdgraph.rb, line 27
27:   def htmlfile(type, graphs, field)
28:     file = File.join(hostdir, "#{type}.html")
29:     File.open(file, "w") do |of|
30:       of.puts "<html><head><title>#{type.capitalize} graphs for #{host}</title></head><body>"
31: 
32:       graphs.each do |graph|
33:         if field == :first
34:           name = graph.sub(/-\w+.png/, '').capitalize
35:         else
36:           name = graph.sub(/\w+-/, '').sub(".png", '').capitalize
37:         end
38:         of.puts "<img src=#{graph}><br>"
39:       end
40:       of.puts "</body></html>"
41:     end
42: 
43:     file
44:   end