summaryrefslogtreecommitdiffstats
path: root/lib/git/author.rb
diff options
context:
space:
mode:
authorscott Chacon <schacon@agadorsparticus.corp.reactrix.com>2007-11-12 17:29:39 -0800
committerscott Chacon <schacon@agadorsparticus.corp.reactrix.com>2007-11-12 17:29:39 -0800
commit852a0e63d294de874c3311f5e7edf40e2f2ecd60 (patch)
treeb77a38e91156d5e330246a6111f0ee835c38a80b /lib/git/author.rb
parentec59c5c7ee9fa3b5831ed0b5f713cee218480ea3 (diff)
downloadthird_party-ruby-git-852a0e63d294de874c3311f5e7edf40e2f2ecd60.tar.gz
third_party-ruby-git-852a0e63d294de874c3311f5e7edf40e2f2ecd60.tar.xz
third_party-ruby-git-852a0e63d294de874c3311f5e7edf40e2f2ecd60.zip
added a bunch of good stuff to the commit object
Diffstat (limited to 'lib/git/author.rb')
-rw-r--r--lib/git/author.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/git/author.rb b/lib/git/author.rb
new file mode 100644
index 0000000..545abb9
--- /dev/null
+++ b/lib/git/author.rb
@@ -0,0 +1,14 @@
+module Git
+ class Author
+ attr_accessor :name, :email, :date
+
+ def initialize(author_string)
+ if m = /(.*?) <(.*?)> (\d+) (.*)/.match(author_string)
+ @name = m[1]
+ @email = m[2]
+ @date = Time.at(m[3].to_i)
+ end
+ end
+
+ end
+end \ No newline at end of file