Method: CodeHunter::GitBlamer#parse
- Defined in:
- lib/code_hunter/git_blamer.rb
#parse(str) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/code_hunter/git_blamer.rb', line 13 def parse(str) { :sha1 => str.lines.to_a[0][/^[0-9a-f]+/], :author => str[/author (.+)/, 1], :email => str[/author-mail <(.+)>/, 1], :modified_at => str[/author-time (\d+)/, 1].to_i, } end |