class Aruba::Processes::DebugProcess
Run your command in ‘system()` to make debugging it easier. This will make the process use the default input and output streams so the developer can interact with it directly. This means that part of Aruba’s functionality is disabled. I.e., checks for output, and passing input programmatically will not work.
‘DebugProcess` is not meant for direct use - `DebugProcess.new` - by users. Only its public methods are part of the public API of aruba, e.g. `#stdin`, `#stdout`.
@private
Public Class Methods
match?(mode)
click to toggle source
Use only if mode is :debug
# File lib/aruba/processes/debug_process.rb, line 20 def self.match?(mode) mode == :debug || (mode.is_a?(Class) && mode <= DebugProcess) end
Public Instance Methods
close_io(*)
click to toggle source
Close nothing
# File lib/aruba/processes/debug_process.rb, line 61 def close_io(*); end
interactive?()
click to toggle source
# File lib/aruba/processes/debug_process.rb, line 75 def interactive? true end
start()
click to toggle source
# File lib/aruba/processes/debug_process.rb, line 24 def start @started = true Dir.chdir @working_directory do Aruba.platform.with_environment(environment) do @exit_status = system(command, *arguments) ? 0 : 1 end end end
stderr(*)
click to toggle source
Return stderr
@return [String]
A predefined string to make users aware they are using the DebugProcess
# File lib/aruba/processes/debug_process.rb, line 52 def stderr(*) "This is the debug launcher on STDERR." \ " If this output is unexpected, please check your setup." end
stdin(*)
click to toggle source
Return stdin
@return [NilClass]
Nothing
# File lib/aruba/processes/debug_process.rb, line 37 def stdin(*); end
stdout(*)
click to toggle source
Return stdout
@return [String]
A predefined string to make users aware they are using the DebugProcess
# File lib/aruba/processes/debug_process.rb, line 43 def stdout(*) "This is the debug launcher on STDOUT." \ " If this output is unexpected, please check your setup." end
stop(*)
click to toggle source
Stop process
# File lib/aruba/processes/debug_process.rb, line 64 def stop(*) @started = false @exit_status end
terminate(*)
click to toggle source
Terminate process
# File lib/aruba/processes/debug_process.rb, line 71 def terminate(*) stop end
write(*)
click to toggle source
Write to nothing
# File lib/aruba/processes/debug_process.rb, line 58 def write(*); end