Sha256: a0cba53c24ba3d5ca7ff7805dfc5954af1e87192d0c0c618f9ea4bf463e4f7ee
Contents?: true
Size: 604 Bytes
Versions: 13
Compression:
Stored size: 604 Bytes
Contents
module CC module Analyzer module Formatters class JSONFormatter < Formatter def engine_running(engine) @active_engine = engine yield @active_engine = nil end def write(data) return unless data.present? document = JSON.parse(data) document["engine_name"] = @active_engine.name puts document.to_json end def failed(output) $stderr.puts "\nAnalysis failed with the following output:" $stderr.puts output exit 1 end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems