Class: RIO::Stream::Input

Inherits:
IOBase show all
Includes:
Ops::Stream::Input, Filters, Ini
Defined in:
lib/rio/stream.rb

Direct Known Subclasses

HTTP::Stream::Input, Duplex::Input

Instance Method Summary collapse

Methods included from Filters

#add_line_filters

Methods included from Ini

#setup

Methods included from Ops::Stream::Input

#close_read, #copy_stream, #each, #each_0, #each_record, #each_row, #empty?, #get, #get_type, #getline, #getrec, #getrow, #recno, #rewind, #to_h

Methods included from Piper::Cp::Input

#has_output_dest?, #last_rio, #|

Methods included from Cp::Stream::Input

#>, #>>

Methods included from Cp::Util::InOut

#cpclose, #cpclose0

Methods included from Grande

#[]

Methods included from Match::Common

#ss_type?

Methods included from Ops::Stream::Read

#contents, #each_byte, #each_bytes, #each_line, #getc, #gets, #lineno, #lineno=, #read, #readchar, #readline, #readlines, #readpartial, #ungetc

Methods included from Ops::Stream::Status

#closed?, #eof?, #open?, #stat

Methods inherited from IOBase

#add_filter, #base_state, #check?, copier, #rectype_mod, #reset, #setup, #when_missing

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::Path::ExistOrNot

#symlink

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

#to_a

Instance Method Details

#add_extensionsObject



104
105
106
107
# File 'lib/rio/stream.rb', line 104

def add_extensions()
  #p callstr('add_extensions')
  Ext::Input.add_extensions(self)
end

#add_filtersObject



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/rio/stream.rb', line 108

def add_filters
  if gzip?
    gz = Zlib::GzipReader.new(self.ioh.ios)
    gz.extend Filter::GZipMissing
    gz.extend Filter::GZipWin32MissingEachLine
    self.ioh.ios = gz
    add_filter(Filter::GZipRead)
  end
  if csv?
    require 'rio/ext/csv/filter' if $USE_FASTER_CSV
    self.extend(::RIO::Ext::CSV::Input)
    add_csv_filter() if $USE_FASTER_CSV
  end
  add_line_filters()
  self
end

#add_rec_methodsObject



124
125
126
# File 'lib/rio/stream.rb', line 124

def add_rec_methods()
  self.extend(rectype_mod.module_eval('Input'))
end