Class: Git::Author Deprecated
- Inherits:
-
Object
- Object
- Git::Author
- Defined in:
- lib/git/author.rb
Overview
Deprecated.
Use AuthorInfo instead; this mutable class will be removed in v6.0.0
An author in a Git commit
Instance Attribute Summary collapse
-
#date ⇒ Time?
The date the change was authored (author date, not committer date).
-
#email ⇒ String?
The author's email.
-
#name ⇒ String?
The author's name.
Instance Method Summary collapse
-
#initialize(author_string)
constructor
deprecated
Deprecated.
Use Git::AuthorInfo.parse instead
Constructor Details
#initialize(author_string)
Deprecated.
Use Git::AuthorInfo.parse instead
Initializes a new Author object from a string
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/git/author.rb', line 32 def initialize() 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()) @name = m[1] @email = m[2] @date = Time.at(m[3].to_i) end |
Instance Attribute Details
#date ⇒ Time?
Returns the date the change was authored (author date, not committer date).
19 20 21 |
# File 'lib/git/author.rb', line 19 def date @date end |
#email ⇒ String?
Returns the author's email.
16 17 18 |
# File 'lib/git/author.rb', line 16 def email @email end |
#name ⇒ String?
Returns the author's name.
13 14 15 |
# File 'lib/git/author.rb', line 13 def name @name end |