Class: ProcessExecuter::Options::RunWithCaptureOptions
- Inherits:
-
RunOptions
- Object
- Base
- SpawnOptions
- SpawnWithTimeoutOptions
- RunOptions
- ProcessExecuter::Options::RunWithCaptureOptions
- Defined in:
- lib/process_executer/options/run_with_capture_options.rb
Overview
Define options for ProcessExecuter.run_with_capture
Constant Summary collapse
- DEFAULT_ENCODING =
The default encoding used for stdout and stderr if no other encoding is specified.
Encoding::UTF_8
Constants inherited from SpawnOptions
Instance Method Summary collapse
-
#effective_stderr_encoding ⇒ Encoding
private
Determines the character encoding to use for stderr.
-
#effective_stdout_encoding ⇒ Encoding
private
Determines the character encoding to use for stdout.
Methods inherited from SpawnOptions
#redirection?, #spawn_options, #std_redirection?, #stderr_redirection?, #stderr_redirection_destination, #stderr_redirection_source, #stdout_redirection?, #stdout_redirection_destination, #stdout_redirection_source
Methods inherited from Base
#allowed_options, #each_with_object, #initialize, #inspect, #merge, #merge!, #to_h, #to_s
Constructor Details
This class inherits a constructor from ProcessExecuter::Options::Base
Instance Method Details
#effective_stderr_encoding ⇒ Encoding
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.
Determines the character encoding to use for stderr
It prioritizes stderr_encoding
if set, otherwise falls back to
encoding
, and finally defaults to DEFAULT_ENCODING
if neither
is available.
44 45 46 |
# File 'lib/process_executer/options/run_with_capture_options.rb', line 44 def effective_stderr_encoding stderr_encoding || encoding || DEFAULT_ENCODING end |
#effective_stdout_encoding ⇒ Encoding
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.
Determines the character encoding to use for stdout
It prioritizes stdout_encoding
if set, otherwise falls back to
encoding
, and finally defaults to DEFAULT_ENCODING
if neither
is available.
30 31 32 |
# File 'lib/process_executer/options/run_with_capture_options.rb', line 30 def effective_stdout_encoding stdout_encoding || encoding || DEFAULT_ENCODING end |