Class: JsonResults

Inherits:
Object
  • Object
show all
Defined in:
lib/cfn-nag/result_view/json_results.rb

Instance Method Summary collapse

Instance Method Details

#render(results) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/cfn-nag/result_view/json_results.rb', line 4

def render(results)

  hashified_results = results.each do |result|
    result[:file_results][:violations] = result[:file_results][:violations].map { |violation| violation.to_h }
  end

  puts JSON.pretty_generate(hashified_results)
end