Class: RIO::StdIO::RRL
- Extended by:
- Fwd
- Defined in:
- lib/rio/scheme/stdio.rb
Constant Summary collapse
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(u) ⇒ RRL
constructor
A new instance of RRL.
- #open(m) ⇒ Object
Methods included from Fwd
fwd, fwd_reader, fwd_readers, fwd_writer, fwd_writers
Constructor Details
#initialize(u) ⇒ RRL
Returns a new instance of RRL.
34 35 36 |
# File 'lib/rio/scheme/stdio.rb', line 34 def initialize(u) super(u) end |
Instance Method Details
#close ⇒ Object
53 54 55 56 |
# File 'lib/rio/scheme/stdio.rb', line 53 def close() uri.scheme = RIOSCHEME self.ios = nil end |
#open(m) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/rio/scheme/stdio.rb', line 40 def open(m) case when m.primarily_read? uri.scheme = 'stdin' return super($stdin.clone) when m.primarily_write? uri.scheme = 'stdout' return super($stdout.clone) else raise ArgumentError,sprintf("Can not %s a %s with mode '%s'",'open',self.class,m) end nil end |