Class: RubyCritic::SourceControlSystem::Git::Churn
- Inherits:
-
Object
- Object
- RubyCritic::SourceControlSystem::Git::Churn
- Defined in:
- lib/rubycritic/source_control_systems/git/churn.rb
Instance Method Summary collapse
- #date_of_last_commit(path) ⇒ Object
-
#initialize(churn_after: nil, paths: ['.']) ⇒ Churn
constructor
A new instance of Churn.
- #revisions_count(path) ⇒ Object
Constructor Details
#initialize(churn_after: nil, paths: ['.']) ⇒ Churn
Returns a new instance of Churn.
24 25 26 27 28 29 30 31 |
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 24 def initialize(churn_after: nil, paths: ['.']) @churn_after = churn_after @paths = Array(paths) @date = nil @stats = {} call end |
Instance Method Details
#date_of_last_commit(path) ⇒ Object
37 38 39 |
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 37 def date_of_last_commit(path) stats(path).date end |
#revisions_count(path) ⇒ Object
33 34 35 |
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 33 def revisions_count(path) stats(path).count end |