Class: TreasureData::FileReader::DelimiterParser

Inherits:
Object
  • Object
show all
Defined in:
lib/td/file_reader.rb

Instance Method Summary collapse

Constructor Details

#initialize(reader, error, opts) ⇒ DelimiterParser

Returns a new instance of DelimiterParser.



71
72
73
74
# File 'lib/td/file_reader.rb', line 71

def initialize(reader, error, opts)
  @reader = reader
  @delimiter_expr = opts[:delimiter_expr]
end

Instance Method Details

#forwardObject



76
77
78
79
# File 'lib/td/file_reader.rb', line 76

def forward
  row = @reader.forward_row
  array = row.split(@delimiter_expr)
end