Class: Grit::Commit

Inherits:
Object
  • Object
show all
Defined in:
lib/commit-comment-tools/repository-stats.rb,
lib/commit-comment-tools/repository-loader.rb

Instance Method Summary collapse

Instance Method Details

#autor_nameObject



19
20
21
# File 'lib/commit-comment-tools/repository-stats.rb', line 19

def autor_name
  author.name
end

#diff_bytesizeObject



7
8
9
10
11
# File 'lib/commit-comment-tools/repository-stats.rb', line 7

def diff_bytesize
  @diff_bytesize ||= diffs.inject(0) do |memo, _diff|
    memo + _diff.diff.bytesize
  end
end

#diff_lines_countObject



13
14
15
16
17
# File 'lib/commit-comment-tools/repository-stats.rb', line 13

def diff_lines_count
  @diff_lines_count ||= diffs.inject(0) do |memo, _diff|
    memo + _diff.diff.lines.to_a.size
  end
end