Sha256: 812f6b703a15edf08b14824dfa91de967cf89360d36431e51add30f1d1e645bd
Contents?: true
Size: 794 Bytes
Versions: 1
Compression:
Stored size: 794 Bytes
Contents
require 'slim' require 'json' module SourceRoute module Formats module Html def self.slim_render(wrapper) result_config = wrapper.condition.result_config template_path = File.expand_path "../html_template.slim", __FILE__ slim_template = Slim::Template.new(template_path, pretty: true) filename = result_config[:filename] || "#{Time.now.strftime('%H%M')}-source-route.html" if result_config.import_return_to_call and wrapper.condition.has_call_and_return_event wrapper.import_return_value_to_call_chain wrapper.order_call_chain end html_output_str = slim_template.render(wrapper) File.open(filename, 'w') do |f| f << html_output_str end end end # END Html end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
source_route-0.1.2 | lib/source_route/formats/html.rb |