Module: RIO::Ext::CSV::Input
- Defined in:
- lib/rio/ext/csv/csv.rb,
lib/rio/ext/csv/filter.rb,
lib/rio/ext/csv/csv-legacy.rb
Instance Method Summary collapse
Instance Method Details
#add_csv_filter ⇒ Object
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/rio/ext/csv/filter.rb', line 166 def add_csv_filter begin end begin if cx['headers_args'] cx['csv_args'][0] ||= {} cx['csv_args'][0][:headers] = cx['headers_args'] else if cx['stream_itertype'] == 'rows' cx['csv_args'][0] ||= {} cx['csv_args'][0][:headers] = true #cx['csv_args'][0][:return_headers] = true end end end csvio = ::CSV.new(self.ioh.ios.binmode,*cx['csv_args']) csvio.extend Filter::CSVMissing csvio.set_cx(cx) self.ioh.ios = csvio end |
#contents ⇒ Object
124 125 126 127 128 |
# File 'lib/rio/ext/csv/csv.rb', line 124 def contents() _post_eof_close { self.to_io.read || "" } end |