Sha256: f0b596a6429a0984c91c4df350d23f5532bbf1e67748f5d5c5b7d281c6ba5339
Contents?: true
Size: 629 Bytes
Versions: 3
Compression:
Stored size: 629 Bytes
Contents
# frozen_string_literal: true require 'rubycritic/analysers/helpers/flog' require 'rubycritic/colorize' module RubyCritic module Analyser class Complexity include Colorize def initialize(analysed_modules) @flog = Flog.new @analysed_modules = analysed_modules end def run @analysed_modules.each do |analysed_module| @flog.reset @flog.flog(analysed_module.path) analysed_module.complexity = @flog.total_score.round print green '.' end puts '' end def to_s 'complexity' end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubycritic-3.2.3 | lib/rubycritic/analysers/complexity.rb |
rubycritic-3.2.2 | lib/rubycritic/analysers/complexity.rb |
rubycritic-3.2.1 | lib/rubycritic/analysers/complexity.rb |