Module: Raykit
- Defined in:
- lib/raykit.rb,
lib/raykit/git.rb,
lib/raykit/timer.rb,
lib/raykit/dotnet.rb,
lib/raykit/command.rb,
lib/raykit/version.rb,
lib/raykit/environment.rb
Defined Under Namespace
Classes: Command, DotNet, Environment, Git, Timer, Version
Class Method Summary collapse
Class Method Details
.run(command) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/raykit.rb', line 13 def Raykit.run(command) timer = Timer.new exit,exit,exit = Open3.capture3(command) if(exit == 0)#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 |