Class: Git::Author
- Inherits:
-
Object
- Object
- Git::Author
- Defined in:
- lib/git/author.rb
Overview
An author in a Git commit
Instance Attribute Summary collapse
-
#date
Returns the value of attribute date.
-
#email
Returns the value of attribute email.
-
#name
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(author_string) ⇒ Author
constructor
A new instance of Author.
Constructor Details
#initialize(author_string) ⇒ Author
8 9 10 11 12 13 14 |
# File 'lib/git/author.rb', line 8 def initialize() return unless (m = /(.*?) <(.*?)> (\d+) (.*)/.match()) @name = m[1] @email = m[2] @date = Time.at(m[3].to_i) end |
Instance Attribute Details
#date
Returns the value of attribute date.
6 7 8 |
# File 'lib/git/author.rb', line 6 def date @date end |
Returns the value of attribute email.
6 7 8 |
# File 'lib/git/author.rb', line 6 def email @email end |
#name
Returns the value of attribute name.
6 7 8 |
# File 'lib/git/author.rb', line 6 def name @name end |