Method: ProcessExecuter::Options::SpawnOptions#spawn_options

Defined in:
lib/process_executer/options/spawn_options.rb

#spawn_optionsHash

Returns the options to be passed to Process.spawn

Examples:

options = ProcessExecuter::Options.new(out: $stdout, err: $stderr, timeout_after: 10)
options.spawn_options # => { out: $stdout, err: $stderr }

Returns:

  • (Hash)


37
38
39
40
41
42
43
# File 'lib/process_executer/options/spawn_options.rb', line 37

def spawn_options
  {}.tap do |spawn_options|
    options.each do |option_key, value|
      spawn_options[option_key] = value if include_spawn_option?(option_key, value)
    end
  end
end