Class: Bugwatch::Churn
- Inherits:
-
Object
- Object
- Bugwatch::Churn
- Defined in:
- lib/bugwatch/churn.rb
Constant Summary collapse
- DEFAULT_CHURN =
0
Instance Method Summary collapse
-
#initialize(commit_stats, file_adapter) ⇒ Churn
constructor
A new instance of Churn.
- #score ⇒ Object
- #test_score ⇒ Object
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
#score ⇒ Object
42 43 44 |
# File 'lib/bugwatch/churn.rb', line 42 def score calculate_churn(&@file_adapter.method(:analyzable_file?)) end |
#test_score ⇒ Object
46 47 48 |
# File 'lib/bugwatch/churn.rb', line 46 def test_score calculate_churn(&@file_adapter.method(:test_file?)) end |