Module: SourceRoute::Formats::Html
- Defined in:
- lib/source_route/formats/html.rb
Class Method Summary collapse
-
.slim_render(results) ⇒ Object
results is instance of Wrapper.
Class Method Details
.slim_render(results) ⇒ Object
results is instance of Wrapper
9 10 11 12 13 14 15 16 17 |
# File 'lib/source_route/formats/html.rb', line 9 def self.slim_render(results) template_path = File. "../html_template.slim", __FILE__ slim_template = Slim::Template.new(template_path) html_output_str = slim_template.render(results) File.open("#{Time.now.strftime('%S%M-%H-%m')}-source-route.html", 'w') do |f| f << html_output_str end end |