Class: GnCrossmap::Collector
- Inherits:
-
Object
- Object
- GnCrossmap::Collector
- Defined in:
- lib/gn_crossmap/collector.rb
Overview
Assemble data from CSV reader by checking column fields
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(skip_original) ⇒ Collector
constructor
A new instance of Collector.
- #process_row(row) ⇒ Object
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
#data ⇒ Object (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 |