class Benchmark::IPS::Report

def generate_json(path)

Parameters:
  • path (String) -- path to generate json.
def generate_json(path)
  require "json"
  if path.respond_to?(:write) # STDOUT
    path.write JSON.pretty_generate(data)
  else
    File.open path, "w" do |f|
      f.write JSON.pretty_generate(data)
    end
  end
end