Class: ProcessExecuter::Destinations::Writer Private
- Inherits:
-
DestinationBase
- Object
- DestinationBase
- ProcessExecuter::Destinations::Writer
- Defined in:
- lib/process_executer/destinations/writer.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 generic objects that respond to #write
Instance Attribute Summary
Attributes inherited from DestinationBase
Class Method Summary collapse
-
.handles?(destination) ⇒ Boolean
private
Determines if this class can handle the given destination.
Instance Method Summary collapse
-
#write(data) ⇒ Integer
private
Writes data to the destination object.
Methods inherited from DestinationBase
#close, compatible_with_monitored_pipe?, #compatible_with_monitored_pipe?, #initialize
Constructor Details
This class inherits a constructor from ProcessExecuter::Destinations::DestinationBase
Class Method Details
.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
33 34 35 |
# File 'lib/process_executer/destinations/writer.rb', line 33 def self.handles?(destination) destination.respond_to?(:write) && (!destination.respond_to?(:fileno) || destination.fileno.nil?) end |
Instance Method Details
#write(data) ⇒ Integer
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.
Writes data to the destination object
22 23 24 25 |
# File 'lib/process_executer/destinations/writer.rb', line 22 def write(data) super destination.write data end |