class CsvHashReader::Builder
Public Class Methods
new( parser )
click to toggle source
# File lib/csvreader/builder.rb, line 51 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 63 def config() @parser.config; end
foreach( path, **kwargs, &block )
click to toggle source
# File lib/csvreader/builder.rb, line 75 def foreach( path, **kwargs, &block ) CsvHashReader.foreach( path, parser: @parser, **kwargs, &block ) end
open( path, mode=nil, **kwargs, &block )
click to toggle source
# File lib/csvreader/builder.rb, line 67 def open( path, mode=nil, **kwargs, &block ) CsvHashReader.open( path, mode, parser: @parser, **kwargs, &block ) end
parse( str_or_readable, **kwargs, &block )
click to toggle source
# File lib/csvreader/builder.rb, line 80 def parse( str_or_readable, **kwargs, &block ) CsvHashReader.parse( str_or_readable, parser: @parser, **kwargs, &block ) end
read( path, **kwargs )
click to toggle source
# File lib/csvreader/builder.rb, line 71 def read( path, **kwargs ) CsvHashReader.read( path, parser: @parser, **kwargs ) end