Class: RIO::Stream::IOBase
- Includes:
- Ops::Path::Str, Ops::Stream::Manip, Ops::Stream::Status
- Defined in:
- lib/rio/stream.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add_filter(mod) ⇒ Object
- #base_state ⇒ Object
- #check? ⇒ Boolean
- #rectype_mod ⇒ Object
- #reset ⇒ Object
- #setup ⇒ Object
- #when_missing(sym, *args) ⇒ Object
Methods included from Ops::Stream::Manip
#flush, #fsync, #isatty, #pid, #seek, #to_io, #tty?
Methods included from Fwd
#fwd, #fwd_reader, #fwd_readers, #fwd_writer, #fwd_writers
Methods included from Ops::Stream::Status
#closed?, #eof?, #open?, #stat
Methods included from Ops::Path::ExistOrNot
Methods included from Ops::Path::URI
#abs, #absolute?, #base, #merge, #rel, #route_from, #route_to, #setbase
Methods included from Ops::Path::Create
#/, #cleanpath, #cwd, #getwd, #join, #join!, #rootpath
Methods included from Ops::Path::Query
#+, #basename, #dirname, #expand_path, #extname, #filename, #gsub, #normalize, #splitpath, #sub
Methods included from Ops::Path::Status
#atime, #ctime, #executable?, #executable_real?, #fnmatch, #fnmatch?, #ftype, #grpowned?, #mtime, #owned?, #readable?, #readable_real?, #root?, #setgid?, #setuid?, #size, #size?, #stat, #sticky?, #writable?, #writable_real?, #zero?
Methods included from Ops::Path::Test
#blockdev?, #chardev?, #closed?, #directory?, #exist?, #file?, #open?, #pipe?, #socket?, #symlink?
Methods inherited from Base
Class Method Details
Instance Method Details
#add_filter(mod) ⇒ Object
75 76 77 78 79 |
# File 'lib/rio/stream.rb', line 75 def add_filter(mod) unless ioh.kind_of?(mod) ioh.extend(mod) end end |
#base_state ⇒ Object
65 |
# File 'lib/rio/stream.rb', line 65 def base_state() 'Stream::Close' end |
#check? ⇒ Boolean
60 |
# File 'lib/rio/stream.rb', line 60 def check?() open? end |
#rectype_mod ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/rio/stream.rb', line 80 def rectype_mod case cx['stream_rectype'] when 'lines' then RIO::RecType::Lines when 'bytes' then RIO::RecType::Bytes else RIO::RecType::Lines end end |
#reset ⇒ Object
66 67 68 |
# File 'lib/rio/stream.rb', line 66 def reset() self.close.softreset() end |
#setup ⇒ Object
69 70 71 72 73 74 |
# File 'lib/rio/stream.rb', line 69 def setup ioh.sync = sync? if cx.has_key?('sync') ioh.set_encoding(*enc?) if cx.has_key?(:enc_args) self end |
#when_missing(sym, *args) ⇒ Object
61 62 63 64 |
# File 'lib/rio/stream.rb', line 61 def when_missing(sym,*args) #p callstr('when_missing',sym,*args) retryreset() end |