Sha256: 47ae974af1699a99e645ed50807f3ebc9fee66058897382f36100f7d802c6a17
Contents?: true
Size: 662 Bytes
Versions: 2
Compression:
Stored size: 662 Bytes
Contents
require 'erb' module TurnipFormatter class Template module StepException def self.build(exception) template_step_exception.result(binding) end private def self.template_step_exception @template_step_exception ||= ERB.new(<<-EOS) <div class="step_exception"> <span>Failure:</span> <pre><%= ERB::Util.h(exception.to_s) %></pre> <span>Backtrace:</span> <ol> <% exception.backtrace.each do |line| %> <li><%= ERB::Util.h(line) %></li> <% end %> </ol> </div> EOS end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
turnip_formatter-0.0.3 | lib/turnip_formatter/template/step_exception.rb |
turnip_formatter-0.0.2 | lib/turnip_formatter/template/step_exception.rb |