Method: Cod::Pipe#initialize_copy

Defined in:
lib/cod/pipe.rb

#initialize_copy(other) ⇒ Object

Creates a copy of this pipe channel. This performs a shallow #dup except for the file descriptors stored in the pipe, so that a #close affects only one copy.

Examples:

pipe.dup  # => anotherpipe


49
50
51
52
53
# File 'lib/cod/pipe.rb', line 49

def initialize_copy(other)
  super
  @serializer = other.serializer
  @pipe = other.pipe.dup
end