Class: GnCrossmap::Collector

Inherits:
Object
  • Object
show all
Defined in:
lib/gn_crossmap/collector.rb

Overview

Assemble data from CSV reader by checking column fields

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(skip_original) ⇒ Collector

Returns a new instance of Collector.



8
9
10
11
12
13
# File 'lib/gn_crossmap/collector.rb', line 8

def initialize(skip_original)
  @data = []
  @fields = nil
  @collector = nil
  @skip_original = skip_original
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/gn_crossmap/collector.rb', line 6

def data
  @data
end

Instance Method Details

#process_row(row) ⇒ Object



15
16
17
18
19
# File 'lib/gn_crossmap/collector.rb', line 15

def process_row(row)
  @row = row
  @fields ? collect_data : init_fields_collector
  true
end