Sha256: 86442269411c4d687b1f6fb33e8f87a614422429899643e0da98b3dff87993fd
Contents?: true
Size: 556 Bytes
Versions: 23
Compression:
Stored size: 556 Bytes
Contents
# frozen_string_literal: true require "json" module SimpleCov module LastRun class << self def last_run_path File.join(SimpleCov.coverage_path, ".last_run.json") end def read return nil unless File.exist?(last_run_path) json = File.read(last_run_path) return nil if json.strip.empty? JSON.parse(json, symbolize_names: true) end def write(json) File.open(last_run_path, "w+") do |f| f.puts JSON.pretty_generate(json) end end end end end
Version data entries
23 entries across 22 versions & 8 rubygems