Class: Rosette::Core::CommitLog
- Inherits:
-
Object
- Object
- Rosette::Core::CommitLog
- Defined in:
- lib/rosette/core/extractor/commit_log.rb
Overview
Represents a commit log. Commit logs track the status of individual commits, what time the commit occurred, and how many phrases it contains.
Instance Attribute Summary collapse
-
#branch_name ⇒ String
The name of the branch that contains this commit.
-
#commit_datetime ⇒ DateTime
The time this commit was made.
-
#commit_id ⇒ String
The git commit id.
-
#phrase_count ⇒ Fixnum
The number of phrases found in this commit.
-
#repo_name ⇒ String
The name of the repo the commit was found in.
-
#status ⇒ String
The [PhraseStatus] of this commit.
Instance Method Summary collapse
-
#initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) ⇒ CommitLog
constructor
A new instance of CommitLog.
Constructor Details
#initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) ⇒ CommitLog
Returns a new instance of CommitLog.
22 23 24 25 26 27 28 29 |
# File 'lib/rosette/core/extractor/commit_log.rb', line 22 def initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) @repo_name = repo_name @commit_id = commit_id @phrase_count = phrase_count @status = status @commit_datetime = commit_datetime @branch_name = branch_name end |
Instance Attribute Details
#branch_name ⇒ String
Returns the name of the branch that contains this commit.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rosette/core/extractor/commit_log.rb', line 21 class CommitLog def initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) @repo_name = repo_name @commit_id = commit_id @phrase_count = phrase_count @status = status @commit_datetime = commit_datetime @branch_name = branch_name end end |
#commit_datetime ⇒ DateTime
Returns the time this commit was made.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rosette/core/extractor/commit_log.rb', line 21 class CommitLog def initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) @repo_name = repo_name @commit_id = commit_id @phrase_count = phrase_count @status = status @commit_datetime = commit_datetime @branch_name = branch_name end end |
#commit_id ⇒ String
Returns the git commit id.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rosette/core/extractor/commit_log.rb', line 21 class CommitLog def initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) @repo_name = repo_name @commit_id = commit_id @phrase_count = phrase_count @status = status @commit_datetime = commit_datetime @branch_name = branch_name end end |
#phrase_count ⇒ Fixnum
Returns the number of phrases found in this commit.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rosette/core/extractor/commit_log.rb', line 21 class CommitLog def initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) @repo_name = repo_name @commit_id = commit_id @phrase_count = phrase_count @status = status @commit_datetime = commit_datetime @branch_name = branch_name end end |
#repo_name ⇒ String
Returns the name of the repo the commit was found in.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rosette/core/extractor/commit_log.rb', line 21 class CommitLog def initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) @repo_name = repo_name @commit_id = commit_id @phrase_count = phrase_count @status = status @commit_datetime = commit_datetime @branch_name = branch_name end end |
#status ⇒ String
Returns the [PhraseStatus] of this commit.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/rosette/core/extractor/commit_log.rb', line 21 class CommitLog def initialize(repo_name, commit_id, phrase_count = nil, status = nil, commit_datetime = nil, branch_name = nil) @repo_name = repo_name @commit_id = commit_id @phrase_count = phrase_count @status = status @commit_datetime = commit_datetime @branch_name = branch_name end end |