Method: Cod.stdio

Defined in:
lib/cod.rb

.stdio(serializer = nil) ⇒ Cod::Pipe

Links a process’ stdin and stdout up with a pipe. This means that the pipes #put method will print to stdout, and the #get method will read from stdin.

Parameters:

  • serializer (#en, #de) (defaults to: nil)

    optional serializer to use

Returns:



154
155
156
# File 'lib/cod.rb', line 154

def stdio(serializer=nil)
  Cod::Pipe.new(serializer, [$stdin, $stdout])
end