class

Pylon::Session::ProcessTransport

Inherits Reference < Object

stdlibs Process and its APIs report failures by throwing exceptions. We want to avoid exceptions as they can leave the application in undeseriable states but also make potential failures invisible to the type system. Here we effectively wrap Process to explicitly handle the exceptions as they happen and convert them into values. This allows us to encode the potential failures into the return type and force callers to handle them as needed.

Class methods

next_line(errors : IO) : String | Nil
Source
open(command : String, arguments : Array(String), &relay : String -> ) : ProcessTransport | Problem
Source

Instance methods

close
Source
reader
Source
writer
Source