Class: Bugwatch::Import
- Inherits:
-
Object
- Object
- Bugwatch::Import
- Defined in:
- lib/bugwatch/import.rb
Instance Method Summary collapse
- #import(begin_sha = nil) ⇒ Object
-
#initialize(repo, caching_strategy) ⇒ Import
constructor
A new instance of Import.
Constructor Details
#initialize(repo, caching_strategy) ⇒ Import
Returns a new instance of Import.
35 36 37 38 |
# File 'lib/bugwatch/import.rb', line 35 def initialize(repo, caching_strategy) @repo = repo @caching_strategy = caching_strategy end |
Instance Method Details
#import(begin_sha = nil) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/bugwatch/import.rb', line 40 def import(begin_sha=nil) unimported_commits(begin_sha).each do |commit_sha| commit = @repo.commit(commit_sha) @caching_strategy.store(commit) if commit end end |