class ProcessExecuter::Destinations::Stderr

Handles standard error redirection

@api private

Public Class Methods

handles?(destination) click to toggle source

Determines if this class can handle the given destination

@param destination [Object] the destination to check @return [Boolean] true if destination is :err or 2

# File lib/process_executer/destinations/stderr.rb, line 30
def self.handles?(destination)
  [:err, 2].include?(destination)
end

Public Instance Methods

write(data) click to toggle source

Writes data to standard error

@example

stderr_handler = ProcessExecuter::Destinations::Stderr.new(:err)
stderr_handler.write("Error message")

@param data [String] the data to write

@return [Integer] the number of bytes written

# File lib/process_executer/destinations/stderr.rb, line 21
def write(data)
  super
  $stderr.write data
end