summaryrefslogtreecommitdiffstats
path: root/lib/git/author.rb
blob: 545abb9bb96af8f8824c63b29c8b62db5247d966 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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