module RIO::Doc::OPTIONAL

Please read the following first:

Rio Optional Components

This document describes various optional Rio components, that must be explicitly 'required' to be available. These are not included in rio.rb either because they change classes that should not be changed without the developers explicit permission, or because they are not of general enough interest.

to_rio

This option comprises 4 options

RIO.ARGV

require 'rio/argv'
arguments_as_rios = RIO.ARGV

This option provides a function which converts each element of ruby's ARGV into a Rio. Useful when writing a program which takes a list of files as its arguments

RIO.popen3

require 'rio/open3'
input,output,errput = RIO.popen3
RIO.popen3 { |input,output,errput| ... }

This options provides a wrapper around the Open3#popen3 call with the IO objects converted to Rios

RIO.prompt

require 'rio/prompt'
the_anwser = RIO.prompt('What is the answer? ')

This option provides a module function to prompt for input.