File: close.rb

package info (click to toggle)
ruby-process-executer 4.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408 kB
  • sloc: ruby: 873; makefile: 4
file content (24 lines) | stat: -rw-r--r-- 694 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

require_relative 'destination_base'

module ProcessExecuter
  module Destinations
    # Handles the :close redirection option as supported by `Process.spawn`
    #
    # @api private
    class Close < DestinationBase
      # Determines if this class can handle the given destination
      #
      # @param destination [Object] the destination to check
      # @return [Boolean] true if the destination is the symbol `:close`
      def self.handles?(destination)
        destination == :close
      end

      # This class should not be wrapped in a monitored pipe
      # @return [Boolean]
      def self.compatible_with_monitored_pipe? = false
    end
  end
end