Class: GitMiner::Engine::AbstractEngine
  
  
  
  
  
    - Inherits:
 
    - 
      Object
      
        
          - Object
 
          
            - GitMiner::Engine::AbstractEngine
 
          
        
        show all
      
     
  
  
  
  
  
  
  
  
  
  
    - Defined in:
 
    - lib/git_miner/engine/abstract_engine.rb
 
  
  
 
  
    
      Constant Summary
      collapse
    
    
      
        - IDENTIFIER =
          
        
 
        "N/A"
 
      
    
  
  
    
      Instance Method Summary
      collapse
    
    
  
  Constructor Details
  
    
  
  
    #initialize(prefix:, now:)  ⇒ AbstractEngine 
  
  
  
  
    
Returns a new instance of AbstractEngine.
   
 
  
  
    
      
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 
     | 
    
      # File 'lib/git_miner/engine/abstract_engine.rb', line 10
def initialize(prefix:, now:)
  @prefix = prefix
  @timestamp = now.to_i
  git_head = GitUtil.commit_head
  @git_head_tree ||= git_head[/^(tree.+?\n)/]
  @git_head_parent ||= git_head[/^(parent.+?\n)/]
  @git_head_author ||= git_head[/^(author.+?\n)/]
  @git_head_committer ||= git_head[/^(committer.+?\n)/]
  @git_head_message ||= git_head.gsub(/^(tree|parent|author|committer).+\n/, '')
  @git_head_author_prefix = @git_head_author.sub(/\d{10}.+?\n/, '')
  @git_head_committer_prefix = @git_head_committer.sub(/\d{10}.+?\n/, '')
end
     | 
  
 
  
 
  
    Instance Method Details
    
      
  
  
    #mine(author_offset:, committer_offset:, qty:)  ⇒ Object 
  
  
  
  
    
      
26
27
28 
     | 
    
      # File 'lib/git_miner/engine/abstract_engine.rb', line 26
def mine(author_offset:, committer_offset:, qty:)
  raise NotImplementedError
end 
     | 
  
 
    
      
  
  
    #sha1(_str)  ⇒ Object 
  
  
  
  
    
      
6
7
8 
     | 
    
      # File 'lib/git_miner/engine/abstract_engine.rb', line 6
def sha1(_str)
  raise NotImplementedError
end 
     |