!!! %html %head %title Snuffle: = summary.class_name %link{href: "http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css", rel: "stylesheet"} %script{language: "javascript", src: "http://code.jquery.com/jquery-1.11.0.min.js", type: "text/javascript"} %script{language: "javascript", src: "http://code.jquery.com/jquery-migrate-1.2.1.min.js", type: "text/javascript"} %script{language: "javascript", src: "http://cdn.datatables.net/1.10.0/js/jquery.dataTables.js", type: "text/javascript"} %style{media: "screen", type: "text/css"} = Rouge::Theme.find('thankful_eyes').render(scope: '.highlight') body { line-height: 1.5em; background: #49525a; color: #fff; font-family: arial, sans-serif; font-size: 14px; padding: 2em; } pre.lineno { margin-top: -1.4em !important;} pre { line-height: 1.75em;} span.highlighted { background: rgba(200, 0, 0, .4); padding-left: 1em; border-radius: 100px; display: inline-block; position: absolute; left: 0px; padding-right: 90%} div.file_meta { padding: 1em; border-radius: 5px; background: #000; height: 3em; width: 98%; } h1 { color:#fff; font-size: 1.25em; margin-top: .25em; } h2 { color:#fff; font-size: .75em; margin-top: -1em; } h3 { color:#fff; font-size: 1.1em;margin-top: 1em; } = ".indented {margin-left: 4em; }" %body .file_meta %h1 = summary.class_name %h2 = summary.path_to_file %h3.indented Candidate object attributes: %ul.indented - summary.cohorts.group_by{|c| c.values.sort }.each do |values, cohorts| - if cohorts.count > 0 %li = values.map{|c| "##{c}" }.join(", ") %br = ":#{cohorts.map(&:line_numbers).join(', :')}" = source_lines %br %input{onclick: "history.back(-1)", type: "button", value: "Back"} :javascript var line_numbers = #{summary.cohorts.map(&:line_numbers).flatten}; $('pre.lineno').html($('pre.lineno').html().split(/\s+/).map(function(val){ if (line_numbers.indexOf(parseInt(val)) > -1) { return "" + val + "\n" } else { return "" + val + "\n"};})) for (i = 0; i <= line_numbers; i ++) { $('.code pre').html($('.code pre').html().split(/\s+/)[i].html("" + i + "\n")) }