Method: String#latest_commit
- Defined in:
- lib/raykit/string.rb
#latest_commit ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/raykit/string.rb', line 9 def latest_commit Dir.chdir(self) do text=`git log -n 1` scan=text.scan(/commit ([\w]+)\s/) return scan[0][0].to_s end end |