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 ⇒ Collector
constructor
A new instance of Collector.
- #process_row(row) ⇒ Object
Constructor Details
#initialize ⇒ Collector
Returns a new instance of Collector.
6 7 8 9 10 |
# File 'lib/gn_crossmap/collector.rb', line 6 def initialize @data = [] @fields = nil @collector = nil end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
4 5 6 |
# File 'lib/gn_crossmap/collector.rb', line 4 def data @data end |
Instance Method Details
#process_row(row) ⇒ Object
12 13 14 15 |
# File 'lib/gn_crossmap/collector.rb', line 12 def process_row(row) @row = row @fields ? collect_data : init_fields_collector end |