class AbtionScripts::TodayI
Public Class Methods
description()
click to toggle source
# File lib/abtion_scripts/todayi.rb, line 10 def self.description "Prints a list of commit msgs from today" end
help()
click to toggle source
# File lib/abtion_scripts/todayi.rb, line 2 def self.help <<-EOF abtion today-i Prints out a list of commit message names that you worked on today. EOF end
Public Instance Methods
run()
click to toggle source
# File lib/abtion_scripts/todayi.rb, line 14 def run date_string = Time.now.to_s.split(' ')[0] lines = %x{ git log \ --date=local \ --oneline \ --after="#{date_string} 00:00" \ --before="#{date_string} 23:59" } lines.each_line do |line| puts line.split(" ", 2)[1] end end