Class: Codescout::CommitStats
- Inherits:
-
Object
- Object
- Codescout::CommitStats
- Defined in:
- lib/codescout/commit_stats.rb
Instance Method Summary collapse
-
#initialize(analyzer) ⇒ CommitStats
constructor
A new instance of CommitStats.
- #to_hash ⇒ Object
Constructor Details
#initialize(analyzer) ⇒ CommitStats
Returns a new instance of CommitStats.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/codescout/commit_stats.rb', line 7 def initialize(analyzer) git = Git.open(".", log: Logger.new(STDERR)) commit = git.gcommit("HEAD") @hash = { commit: commit.sha, author: commit..name, author_email: commit..email, committer: commit.committer.name, committer_email: commit.committer.email, branch: commit.name, message: commit. } end |
Instance Method Details
#to_hash ⇒ Object
22 23 24 |
# File 'lib/codescout/commit_stats.rb', line 22 def to_hash @hash end |