Class: ConsoleRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/commons.rb

Direct Known Subclasses

SimulatorRunner

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

#usernameObject



258
259
260
# File 'lib/commons.rb', line 258

def username
    return `echo $USER`.chomp
end