class GitPlus::Parsers::Commits::Unsaved::History
Parses unsaved commit history into commit objects.
Attributes
entry[R]
Public Class Methods
new(entry: Entry)
click to toggle source
# File lib/git_plus/parsers/commits/unsaved/history.rb, line 9 def initialize entry: Entry @entry = entry end
Public Instance Methods
call(path)
click to toggle source
# File lib/git_plus/parsers/commits/unsaved/history.rb, line 13 def call path fail Error, %(Invalid commit message path: "#{path}".) unless path.exist? path.read.scrub("?").then { |message| entry.call message } end