Class: Bugwatch::Churn

Inherits:
Object
  • Object
show all
Defined in:
lib/bugwatch/churn.rb

Constant Summary collapse

DEFAULT_CHURN =
0

Instance Method Summary collapse

Constructor Details

#initialize(commit_stats, file_adapter) ⇒ Churn

Returns a new instance of Churn.



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

def initialize(commit_stats, file_adapter)
  @commit_stats = commit_stats
  @file_adapter = file_adapter
end

Instance Method Details

#scoreObject



42
43
44
# File 'lib/bugwatch/churn.rb', line 42

def score
  calculate_churn(&@file_adapter.method(:analyzable_file?))
end

#test_scoreObject



46
47
48
# File 'lib/bugwatch/churn.rb', line 46

def test_score
  calculate_churn(&@file_adapter.method(:test_file?))
end