Class: Git::Author
- Inherits:
-
Object
- Object
- Git::Author
- Defined in:
- lib/git/author.rb
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
Returns a new instance of Author.
5 6 7 8 9 10 11 |
# File 'lib/git/author.rb', line 5 def initialize() if m = /(.*?) <(.*?)> (\d+) (.*)/.match() @name = m[1] @email = m[2] @date = Time.at(m[3].to_i) end end |
Instance Attribute Details
#date
Returns the value of attribute date.
3 4 5 |
# File 'lib/git/author.rb', line 3 def date @date end |
Returns the value of attribute email.
3 4 5 |
# File 'lib/git/author.rb', line 3 def email @email end |
#name
Returns the value of attribute name.
3 4 5 |
# File 'lib/git/author.rb', line 3 def name @name end |