class JekyllGitAuthors::Git::Log
Git::Log
parses output passed from Git#log and creates a hash with author as a key and email as value
Public Class Methods
new(log, max_authors_count = 5)
click to toggle source
We are expecting output from “git log” command max_authors_count - maximum number of unique authors to return
# File lib/jekyll-git-authors/git.rb, line 10 def initialize(log, max_authors_count = 5) @log = log.force_encoding(Encoding::UTF_8) @max_authors_count = max_authors_count raise InvalidEncoding unless @log.valid_encoding? end
Public Instance Methods
to_s()
click to toggle source
To ensure log will be text when we want
# File lib/jekyll-git-authors/git.rb, line 27 def to_s @log end