schacon/ruby-git

View on GitHub
lib/git/author.rb

Summary

Maintainability
A
0 mins
Test Coverage
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