Class: Bugwatch::RubyComplexity

Inherits:
Object
  • Object
show all
Includes:
RubyFileAdapter
Defined in:
lib/bugwatch/ruby_complexity.rb

Instance Method Summary collapse

Methods included from RubyFileAdapter

#analyzable_file?, #ruby_file?, #test_file?

Constructor Details

#initialize(diffs) ⇒ RubyComplexity

Returns a new instance of RubyComplexity.



37
38
39
# File 'lib/bugwatch/ruby_complexity.rb', line 37

def initialize(diffs)
  @diffs = diffs
end

Instance Method Details

#cyclomaticObject



57
58
59
# File 'lib/bugwatch/ruby_complexity.rb', line 57

def cyclomatic
  []
end

#scoreObject



41
42
43
# File 'lib/bugwatch/ruby_complexity.rb', line 41

def score
  ruby_flog.total_score
end

#scoresObject



49
50
51
# File 'lib/bugwatch/ruby_complexity.rb', line 49

def scores
  complexity_scores(ruby_flog.scores)
end

#test_scoreObject



45
46
47
# File 'lib/bugwatch/ruby_complexity.rb', line 45

def test_score
  test_flog.total_score
end

#test_scoresObject



53
54
55
# File 'lib/bugwatch/ruby_complexity.rb', line 53

def test_scores
  complexity_scores(test_flog.scores)
end