Sha256: 1e048b3162dc6bbf0fd45f8a2b6e46e59dd464bf3672c401c1ed0d79a6a889b8
Contents?: true
Size: 384 Bytes
Versions: 44
Compression:
Stored size: 384 Bytes
Contents
require_relative "../../json_compat" class Chef module Compliance module Reporter class JsonFile def initialize(opts) @path = opts.fetch(:file) end def send_report(report) FileUtils.mkdir_p(File.dirname(@path), mode: 0700) File.write(@path, Chef::JSONCompat.to_json(report)) end end end end end
Version data entries
44 entries across 44 versions & 1 rubygems