Class: Chronicle::ETL::StdinExtractor

Inherits:
Extractor
  • Object
show all
Defined in:
lib/chronicle/etl/extractors/stdin_extractor.rb

Instance Attribute Summary

Attributes included from Registry::SelfRegistering

#connector_registration

Instance Method Summary collapse

Methods inherited from Extractor

#initialize, #prepare, #results_count

Methods included from Registry::SelfRegistering

#register_connector

Methods included from Configurable

included

Constructor Details

This class inherits a constructor from Chronicle::ETL::Extractor

Instance Method Details

#extractObject



11
12
13
14
15
16
# File 'lib/chronicle/etl/extractors/stdin_extractor.rb', line 11

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