Class: RubyCritic::SourceControlSystem::Git::Churn

Inherits:
Object
  • Object
show all
Defined in:
lib/rubycritic/source_control_systems/git/churn.rb

Instance Method Summary collapse

Constructor Details

#initialize(churn_after: nil) ⇒ 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)
  @renames = Renames.new
  @date = nil
  @stats = {}
  @churn_after = churn_after

  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