class GrokCLI::Git::Log::Entry
Attributes
commits[R]
ticket[R]
Public Class Methods
new(ticket:, commits:)
click to toggle source
# File lib/grok_cli/git/log.rb, line 48 def initialize(ticket:, commits:) @ticket = ticket @commits = commits end
Public Instance Methods
to_s()
click to toggle source
# File lib/grok_cli/git/log.rb, line 53 def to_s ERB.new(<<~DOC #{ticket} #{commit_log} DOC ).result(binding) end
Private Instance Methods
commit_log()
click to toggle source
# File lib/grok_cli/git/log.rb, line 66 def commit_log commits.map do |commit| sha = commit.sha[0..8] message = commit.message.split("\n").first "#{sha} (#{message})" end.join("\n") end