lib/io_streams/line/reader.rb in iostreams-1.2.0 vs lib/io_streams/line/reader.rb in iostreams-1.2.1

- old
+ new

@@ -7,11 +7,11 @@ MAX_BLOCKS_MULTIPLIER = 100 LINEFEED_REGEXP = Regexp.compile(/\r\n|\n|\r/).freeze # Read a line at a time from a stream - def self.stream(input_stream, original_file_name: nil, **args) + def self.stream(input_stream, **args) # Pass-through if already a line reader return yield(input_stream) if input_stream.is_a?(self.class) yield new(input_stream, **args) end @@ -42,10 +42,10 @@ # - Handle embedded line feeds when reading csv files. # - Skip Comment lines. RegExp? # - Skip "empty" / "blank" lines. RegExp? # - Extract header line(s) / first non-comment, non-blank line # - Embedded newline support, RegExp? or Proc? - def initialize(input_stream, delimiter: nil, buffer_size: 65_536, embedded_within: nil) + def initialize(input_stream, delimiter: nil, buffer_size: 65_536, embedded_within: nil, original_file_name: nil) super(input_stream) @embedded_within = embedded_within @buffer_size = buffer_size