Sha256: 7fbb41aaab002755a783042ed8b732ced62f3e232c9f637e72cb1a92322a38ca
Contents?: true
Size: 709 Bytes
Versions: 1
Compression:
Stored size: 709 Bytes
Contents
module Deliver class HtmlGenerator # Renders all data available to quickly see if everything was correctly generated. # @param export_path (String) The path to a folder where the resulting HTML file should be stored. def render(options, screenshots, export_path = nil) lib_path = Helper.gem_path('deliver') @screenshots = screenshots || [] @options = options html_path = File.join(lib_path, "lib/assets/summary.html.erb") html = ERB.new(File.read(html_path)).result(binding) # http://www.rrn.dk/rubys-erb-templating-system export_path = File.join(export_path, "Preview.html") File.write(export_path, html) return export_path end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
deliver-1.0.0.beta1 | lib/deliver/html_generator.rb |