class Git::Author
An author in a Git commit
@deprecated Use {Git::AuthorInfo} instead; this mutable class will be
removed in v6.0.0
@api public
Attributes
@return [Time, nil] the date the change was authored (author date, not committer date)
@return [String, nil] the author’s email
@return [String, nil] the author’s name
Public Class Methods
Source
# File lib/git/author.rb, line 32 def initialize(author_string) if defined?(Git::Deprecation) Git::Deprecation.warn( 'Git::Author is deprecated and will be removed in v6.0.0. Use Git::AuthorInfo instead.' ) end return unless (m = /(.*?) <(.*?)> (\d+) (.*)/.match(author_string)) @name = m[1] @email = m[2] @date = Time.at(m[3].to_i) end
Initializes a new Author object from a string
@example
Git::Author.new("John Doe <john.doe@example.com> 1627849923 +0200")
@param author_string [String] the author string
@return [void]
@deprecated Use {Git::AuthorInfo.parse} instead