Class: Chronicle::ETL::Extraction

Inherits:
Object
  • Object
show all
Defined in:
lib/chronicle/etl/extraction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data: {}, meta: {}, source: nil, type: nil, strategy: nil, extractor: nil) ⇒ Extraction

Returns a new instance of Extraction.



8
9
10
11
12
13
14
15
# File 'lib/chronicle/etl/extraction.rb', line 8

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

Instance Attribute Details

#dataObject

Returns the value of attribute data.



6
7
8
# File 'lib/chronicle/etl/extraction.rb', line 6

def data
  @data
end

#extractorObject

Returns the value of attribute extractor.



6
7
8
# File 'lib/chronicle/etl/extraction.rb', line 6

def extractor
  @extractor
end

#metaObject

Returns the value of attribute meta.



6
7
8
# File 'lib/chronicle/etl/extraction.rb', line 6

def meta
  @meta
end

#sourceObject

Returns the value of attribute source.



6
7
8
# File 'lib/chronicle/etl/extraction.rb', line 6

def source
  @source
end

#strategyObject

Returns the value of attribute strategy.



6
7
8
# File 'lib/chronicle/etl/extraction.rb', line 6

def strategy
  @strategy
end

#typeObject

Returns the value of attribute type.



6
7
8
# File 'lib/chronicle/etl/extraction.rb', line 6

def type
  @type
end

Instance Method Details

#to_hObject



17
18
19
# File 'lib/chronicle/etl/extraction.rb', line 17

def to_h
  { data: @data, meta: @meta, source: @source }
end