Class | Grit::Actor |
In: |
lib/grit/actor.rb
|
Parent: | Object |
name | -> | to_s |
[R] | ||
name | [R] |
Create an Actor from a string.
+str+ is the string, which is expected to be in regular git format
Format
John Doe <jdoe@example.com>
Returns Actor
# File lib/grit/actor.rb, line 20 def self.from_string(str) case str when /<.+>/ m, name, email = *str.match(/(.*) <(.+?)>/) return self.new(name, email) else return self.new(str, nil) end end