Method: ProcessExecuter::Options::SpawnOptions#std_redirection?
- Defined in:
- lib/process_executer/options/spawn_options.rb
#std_redirection?(option_key, symbol, fileno) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Does option_key indicate a standard redirection such as stdin, stdout, or stderr
60 61 62 63 |
# File 'lib/process_executer/options/spawn_options.rb', line 60 def std_redirection?(option_key, symbol, fileno) test = ->(key) { key == symbol || key == fileno || (key.is_a?(IO) && key.fileno == fileno) } test.call(option_key) || (option_key.is_a?(Array) && option_key.any? { |key| test.call(key) }) end |