Class: Bugwatch::Analysis

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

Instance Method Summary collapse

Constructor Details

#initialize(repo, caching_strategy) ⇒ Analysis

Returns a new instance of Analysis.



35
36
37
38
# File 'lib/bugwatch/analysis.rb', line 35

def initialize(repo, caching_strategy)
  @repo = repo
  @caching_strategy = caching_strategy
end

Instance Method Details

#analyze(*analyzers) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/bugwatch/analysis.rb', line 40

def analyze(*analyzers)
  analyzers.each do |analyzer|
    commits_to_analyze(analyzer).each do |commit_sha|
      commit = @repo.commit(commit_sha)
      analyzer.call(commit)
      @caching_strategy.store_analysis(commit, analyzer.key)
    end
  end
end