Sha256: ad7a7900c7ae2bd1252d3379dabd9ed6ed11057487ca8d7f8d3a8feca5c7b9b9

Contents?: true

Size: 351 Bytes

Versions: 5

Compression:

Stored size: 351 Bytes

Contents

module Csvlint
  class WrappedIO < SimpleDelegator
    attr_reader :line

    def reset_line
      @line = ''
    end

    def gets(*args)
      if args.size == 1 && args[0].is_a?(String)
        s = __getobj__.gets(args[0])
        if s
          @line << s
        end
        s
      else
        __getobj__.gets(*args)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
csvlint-0.2.0 lib/csvlint/wrapped_io.rb
csvlint-0.1.4 lib/csvlint/wrapped_io.rb
csvlint-0.1.3 lib/csvlint/wrapped_io.rb
csvlint-0.1.1 lib/csvlint/wrapped_io.rb
csvlint-0.1.0 lib/csvlint/wrapped_io.rb