Class: RIO::Stream::IOBase
- Includes:
- Ops::Path::Str, Ops::Stream::Manip, Ops::Stream::Status
- Defined in:
- lib/rio/stream.rb
Constant Summary
Constants inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
- #add_filter(mod) ⇒ Object
- #base_state ⇒ Object
- #check? ⇒ Boolean
-
#rectype_mod ⇒ Object
end.
- #reset ⇒ Object
- #setup ⇒ Object
- #when_missing(sym, *args) ⇒ Object
Methods included from Ops::Stream::Manip
#binmode, #flush, #fsync, #isatty, #pid, #seek, #to_io, #tty?
Methods included from Ops::Stream::Status
#closed?, #eof?, #open?, #stat
Methods included from Ops::Path::ExistOrNot
Methods included from Ops::Path::URI
#abs, #abs?, #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, #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?
Class Method Details
Instance Method Details
#add_filter(mod) ⇒ Object
81 82 83 84 85 |
# File 'lib/rio/stream.rb', line 81 def add_filter(mod) unless ioh.kind_of?(mod) ioh.extend(mod) end end |
#base_state ⇒ Object
73 |
# File 'lib/rio/stream.rb', line 73 def base_state() 'Stream::Close' end |
#check? ⇒ Boolean
68 |
# File 'lib/rio/stream.rb', line 68 def check?() open? end |
#rectype_mod ⇒ Object
end
89 90 91 92 93 94 95 |
# File 'lib/rio/stream.rb', line 89 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
74 75 76 |
# File 'lib/rio/stream.rb', line 74 def reset() self.close.softreset() end |
#setup ⇒ Object
77 78 79 80 |
# File 'lib/rio/stream.rb', line 77 def setup ioh.sync = sync? if cx.has_key?('sync') self end |
#when_missing(sym, *args) ⇒ Object
69 70 71 72 |
# File 'lib/rio/stream.rb', line 69 def when_missing(sym,*args) #p callstr('when_missing',sym,*args) retryreset() end |