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

#initializeChurn

Returns a new instance of Churn.



24
25
26
27
28
29
30
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 24

def initialize
  @renames = Renames.new
  @date = nil
  @stats = {}

  call
end

Instance Method Details

#date_of_last_commit(path) ⇒ Object



36
37
38
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 36

def date_of_last_commit(path)
  stats(path).date
end

#revisions_count(path) ⇒ Object



32
33
34
# File 'lib/rubycritic/source_control_systems/git/churn.rb', line 32

def revisions_count(path)
  stats(path).count
end