Class: SixthSense::Reporters::Html

Inherits:
Object
  • Object
show all
Defined in:
lib/sixth_sense/reporters/html.rb

Instance Method Summary collapse

Instance Method Details

#render(reports) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/sixth_sense/reporters/html.rb', line 6

def render(reports)
  <<~HTML
    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>SixthSense Report</title>
      <style>
        body { font-family: system-ui, sans-serif; margin: 2rem; color: #1f2937; }
        table { border-collapse: collapse; width: 100%; }
        th, td { border: 1px solid #d1d5db; padding: .5rem; text-align: left; }
        th { background: #f3f4f6; }
        .finding { margin: .35rem 0; }
      </style>
    </head>
    <body>
      <h1>SixthSense Report</h1>
      #{summary_table(reports)}
      #{findings(reports)}
    </body>
    </html>
  HTML
end