Module: Jcsv::ListReader::HeaderLess

Defined in:
lib/list_reader.rb

Overview

Headerless ListReader

Instance Method Summary collapse

Instance Method Details

#mapping=(map) ⇒ Object


TODO: Needs to be reviewed. Headerless ListReader needs further testing and eventually a new set of features.




108
109
110
111
112
113
114
115
116
117
118
# File 'lib/list_reader.rb', line 108

def mapping=(map)
  
  raise "Mapping with array is not allowed when 'dimensions' are defined" if @dim_set
  
  raise "Filters parameters should either be a hash or an array of filters" if
    !map.is_a? Array
  
  @column_mapping.mapping ||= map
  @dim_set = true if @dimensions
  
end