Sha256: c792ac3fbd8ab861abedef657b27380bbbb21b109e2f3665d183973513df0244

Contents?: true

Size: 577 Bytes

Versions: 6

Compression:

Stored size: 577 Bytes

Contents

require 'json'
require 'rubycritic/version'

module Rubycritic
  module Generator
    module Json
      class Simple
        def initialize(analysed_modules)
          @analysed_modules = analysed_modules
        end

        def render
          JSON.dump(data)
        end

        def data
          {
            metadata: {
              rubycritic: {
                version: Rubycritic::VERSION
              }
            },
            analysed_modules: @analysed_modules,
            score: @analysed_modules.score
          }
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubycritic-2.9.2 lib/rubycritic/generators/json/simple.rb
rubycritic-2.9.1 lib/rubycritic/generators/json/simple.rb
rubycritic-2.9.0 lib/rubycritic/generators/json/simple.rb
rubycritic-2.8.0 lib/rubycritic/generators/json/simple.rb
rubycritic-2.7.1 lib/rubycritic/generators/json/simple.rb
rubycritic-2.7.0 lib/rubycritic/generators/json/simple.rb