Class: GitFame::Result

Inherits:
Base
  • Object
show all
Defined in:
lib/git_fame/result.rb

Instance Method Summary collapse

Instance Method Details

#authorsArray<Author>

Returns:



8
9
10
# File 'lib/git_fame/result.rb', line 8

def authors
  contributions.map(&:author)
end

#commitsArray<String>

Returns:

  • (Array<String>)


13
14
15
16
17
# File 'lib/git_fame/result.rb', line 13

def commits
  contributions.flat_map do |c|
    c.commits.to_a
  end
end

#filesArray<String>

Returns:

  • (Array<String>)


20
21
22
23
24
# File 'lib/git_fame/result.rb', line 20

def files
  contributions.flat_map do |c|
    c.files.to_a
  end
end

#linesInteger

Returns:

  • (Integer)


27
28
29
# File 'lib/git_fame/result.rb', line 27

def lines
  contributions.sum(&:lines)
end