From 852a0e63d294de874c3311f5e7edf40e2f2ecd60 Mon Sep 17 00:00:00 2001 From: scott Chacon Date: Mon, 12 Nov 2007 17:29:39 -0800 Subject: added a bunch of good stuff to the commit object --- lib/git/author.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/git/author.rb (limited to 'lib/git/author.rb') 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 -- cgit