class CsvReader::Builder

Public Class Methods

new( parser ) click to toggle source
# File lib/csvreader/builder.rb, line 7
def initialize( parser )
  @parser = parser
end

Public Instance Methods

config() click to toggle source

(auto-)forward to wrapped parser

note/fix: not all parser use/have config e.g. ParserTab, ParserFixed, etc.

todo/fix:

add parser config (attribute) setter e.g.
- sep=(value)
- comment=(value)
- and so on!!!
# File lib/csvreader/builder.rb, line 20
def config() @parser.config; end
foreach( path, **kwargs, &block ) click to toggle source
# File lib/csvreader/builder.rb, line 36
def foreach( path, **kwargs, &block )
  CsvReader.foreach( path, parser: @parser, **kwargs, &block )
end
header( path, **kwargs ) click to toggle source
# File lib/csvreader/builder.rb, line 32
def header( path, **kwargs )
  CsvReader.header( path, parser: @parser, **kwargs )
end
open( path, mode=nil, **kwargs, &block ) click to toggle source
# File lib/csvreader/builder.rb, line 24
def open( path, mode=nil, **kwargs, &block )
  CsvReader.open( path, mode, parser: @parser, **kwargs, &block )
end
parse( str_or_readable, **kwargs, &block ) click to toggle source
# File lib/csvreader/builder.rb, line 41
def parse( str_or_readable, **kwargs, &block )
  CsvReader.parse( str_or_readable, parser: @parser, **kwargs, &block )
end
read( path, **kwargs ) click to toggle source
# File lib/csvreader/builder.rb, line 28
def read( path, **kwargs )
  CsvReader.read( path, parser: @parser, **kwargs )
end