lib/chronicle/etl/extraction.rb in chronicle-etl-0.5.5 vs lib/chronicle/etl/extraction.rb in chronicle-etl-0.6.1
- old
+ new
@@ -1,12 +1,22 @@
+# frozen_string_literal: true
+
module Chronicle
module ETL
class Extraction
- attr_accessor :data, :meta
+ attr_accessor :data, :meta, :source, :type, :strategy, :extractor
- def initialize(data: {}, meta: {})
+ def initialize(data: {}, meta: {}, source: nil, type: nil, strategy: nil, extractor: nil)
@data = data
@meta = meta
+ @source = source
+ @type = type
+ @strategy = strategy
+ @extractor = extractor
+ end
+
+ def to_h
+ { data: @data, meta: @meta, source: @source }
end
end
end
end