Method: Arachni::Reporters::JSON#run
- Defined in:
- components/reporters/json.rb
#run ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'components/reporters/json.rb', line 18 def run print_line print_status "Dumping audit results in #{outfile}." File.open( outfile, 'w' ) do |f| begin f.write ::JSON::pretty_generate( report.to_h ) rescue Encoding::UndefinedConversionError f.write ::JSON::pretty_generate( report.to_h.recode ) end end print_status 'Done!' end |