Class: Rake::Task
- Inherits:
-
Object
- Object
- Rake::Task
- Defined in:
- lib/rake_performance.rb
Instance Method Summary collapse
Instance Method Details
#invoke(*args) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/rake_performance.rb', line 7 def invoke(*args) start_time = Time.now puts "Task '#{@name}' started at #{start_time}" old_invoke(args) end_time = Time.now puts "Task '#{@name}' ended at #{end_time}" puts "Total time taken: #{TimeHelper.time_difference(start_time, end_time)}" end |
#old_invoke ⇒ Object
5 |
# File 'lib/rake_performance.rb', line 5 alias :old_invoke :invoke |