Class: ConsoleRunner
- Inherits:
-
Object
- Object
- ConsoleRunner
- Defined in:
- lib/commons.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#remove_file(file) ⇒ Object
254 255 256 |
# File 'lib/commons.rb', line 254 def remove_file(file) File.unlink file end |
#run(cmd) ⇒ Object
262 263 264 265 266 |
# File 'lib/commons.rb', line 262 def run(cmd) vputs "Executing command: #{cmd}" stdout, stderr, status = Open3.capture3(cmd) return [stdout, stderr, status] end |
#username ⇒ Object
258 259 260 |
# File 'lib/commons.rb', line 258 def username return `echo $USER`.chomp end |