Class: HtmlRenderer

Inherits:
Object show all
Defined in:
lib/cfn-nag/iam_complexity_metric/html_results_renderer.rb

Instance Method Summary collapse

Instance Method Details

#render(results:) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/cfn-nag/iam_complexity_metric/html_results_renderer.rb', line 4

def render(results:)
  output = '<html><body><table>'
  results.each do |result|
    output += '<tr><td><table><tr><td>'
    output += result[:filename]
    output += '</td></tr><tr><td>'
    output += render_policy(result)
    output += render_role(result)
    output += '</td></tr></table></td></tr>'
  end
  output += '</table></body></html>'
  output
end