Sha256: c4dbfc3a840b8363af8015dd41eb67e82a08ada4f9d3b099d922535a59b70755
Contents?: true
Size: 497 Bytes
Versions: 6
Compression:
Stored size: 497 Bytes
Contents
module BetterErrors # @private class CodeFormatter::HTML < CodeFormatter def source_unavailable "<p class='unavailable'>Source is not available</p>" end def formatted_lines each_line_of highlighted_lines do |highlight, current_line, str| class_name = highlight ? "highlight" : "" sprintf '<pre class="%s">%5d %s</pre>', class_name, current_line, str end end def formatted_code %{<div class="code">#{super}</div>} end end end
Version data entries
6 entries across 6 versions & 1 rubygems