Module: Raykit
- Defined in:
- lib/raykit.rb,
lib/raykit/timer.rb
Defined Under Namespace
Classes: Timer
Class Method Summary collapse
Class Method Details
.run(command) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/raykit.rb', line 6 def Raykit.run(command) timer = Timer.new if(system(command)) puts timer.elapsed_str + " " + Rainbow(command).yellow.bright return timer.elapsed_str + " " + command else #puts '' puts "\r\n" + command + "\r\n" #puts '' system(command) puts '' abort Rainbow(timer.elapsed_str).red.bright + " " + Rainbow(command).white end end |