Sha256: 41055f74c74d8fd9e9b46f02172d802fac4d9ccd0e5e0bc9e3811fcad128730b

Contents?: true

Size: 353 Bytes

Versions: 13

Compression:

Stored size: 353 Bytes

Contents

module Chronicle
  module ETL
    class StdinExtractor < Chronicle::ETL::Extractor
      register_connector do |r|
        r.description = 'stdin'
      end

      def extract
        $stdin.read.each_line do |line|
          data = { line: line.strip }
          yield Chronicle::ETL::Extraction.new(data: data)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
chronicle-etl-0.5.5 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.5.4 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.5.3 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.5.2 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.5.1 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.5.0 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.4.4 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.4.3 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.4.2 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.4.1 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.4.0 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.3.1 lib/chronicle/etl/extractors/stdin_extractor.rb
chronicle-etl-0.3.0 lib/chronicle/etl/extractors/stdin_extractor.rb