lib/chronicle/etl/extractors/stdin_extractor.rb in chronicle-etl-0.2.4 vs lib/chronicle/etl/extractors/stdin_extractor.rb in chronicle-etl-0.3.0

- old
+ new

@@ -1,10 +1,15 @@ 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| - yield line + data = { line: line.strip } + yield Chronicle::ETL::Extraction.new(data: data) end end end end end