Class: Rosette::Core::CommitLog

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_nameString

Returns the name of the branch that contains this commit.

Returns:

  • (String)

    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_datetimeDateTime

Returns the time this commit was made.

Returns:

  • (DateTime)

    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_idString

Returns the git commit id.

Returns:

  • (String)

    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_countFixnum

Returns the number of phrases found in this commit.

Returns:

  • (Fixnum)

    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_nameString

Returns the name of the repo the commit was found in.

Returns:

  • (String)

    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

#statusString

Returns the [PhraseStatus] of this commit.

Returns:

  • (String)

    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