Sha256: 0a6e8791e1ed4e85269cdc75dc9a8c5f4f0f4e9b23a64e1378b9919589d52525
Contents?: true
Size: 858 Bytes
Versions: 33
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true require 'json' require 'rubycritic/version' require 'pathname' module RubyCritic module Generator module Json class Simple def initialize(analysed_modules) @analysed_modules = analysed_modules end FILE_NAME = 'report.json'.freeze def render JSON.dump(data) end def data { metadata: { rubycritic: { version: RubyCritic::VERSION } }, analysed_modules: @analysed_modules, score: @analysed_modules.score } end def file_directory @file_directory ||= Pathname.new(Config.root) end def file_pathname Pathname.new(file_directory).join FILE_NAME end end end end end
Version data entries
33 entries across 33 versions & 2 rubygems