Sha256: 3b4fb48ad04f09fe107c3528b9cff0439d51e4ae1da3be6c3a287a40d99fff5b

Contents?: true

Size: 594 Bytes

Versions: 5

Compression:

Stored size: 594 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

5 entries across 5 versions & 1 rubygems

Version Path
rubycritic-2.6.0 lib/rubycritic/generators/json/simple.rb
rubycritic-2.5.0 lib/rubycritic/generators/json/simple.rb
rubycritic-2.4.1 lib/rubycritic/generators/json/simple.rb
rubycritic-2.4.0 lib/rubycritic/generators/json/simple.rb
rubycritic-2.3.0 lib/rubycritic/generators/json/simple.rb