Class: ProcessExecuter::Destinations::ChildRedirection Private

Inherits:
DestinationBase show all
Defined in:
lib/process_executer/destinations/child_redirection.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Handles [:child, fd] redirection options as supported by Process.spawn

Instance Attribute Summary

Attributes inherited from DestinationBase

#destination

Class Method Summary collapse

Methods inherited from DestinationBase

#close, #compatible_with_monitored_pipe?, #initialize, #write

Constructor Details

This class inherits a constructor from ProcessExecuter::Destinations::DestinationBase

Class Method Details

.compatible_with_monitored_pipe?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.

This class should not be wrapped in a monitored pipe

Returns:

  • (Boolean)


21
# File 'lib/process_executer/destinations/child_redirection.rb', line 21

def self.compatible_with_monitored_pipe? = false

.handles?(destination) ⇒ 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.

Determines if this class can handle the given destination

Parameters:

  • destination (Object)

    the destination to check

Returns:

  • (Boolean)

    true if the destination is an array in the format [:child, file_descriptor]



15
16
17
# File 'lib/process_executer/destinations/child_redirection.rb', line 15

def self.handles?(destination)
  destination.is_a?(Array) && destination.size == 2 && destination[0] == :child
end