Method: NdrImport::NonTabular::Table#transform
- Defined in:
- lib/ndr_import/non_tabular/table.rb
#transform(lines, &block) ⇒ Object
This method transforms a table of data, given a line array/enumerator and yields klass, fields and index (input row number) for each record that it would create as a result of the transformation process.
60 61 62 63 64 65 66 67 |
# File 'lib/ndr_import/non_tabular/table.rb', line 60 def transform(lines, &block) return enum_for(:transform, lines) unless block self.non_tabular_lines = ensure_utf8_enum!(lines) remove_unwanted_lines super(read_non_tabular_array, &block) end |