Class: CSVImportable::RowImporter

Inherits:
Object
  • Object
show all
Includes:
CSVCoercion
Defined in:
lib/csv_importable/row_importer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CSVCoercion

#boolean_type_class, #date_type_class, #float_type_class, #integer_type_class, #percent_type_class, #select_type_class, #string_type_class

Constructor Details

#initialize(args = {}) ⇒ RowImporter

Returns a new instance of RowImporter.



6
7
8
9
10
# File 'lib/csv_importable/row_importer.rb', line 6

def initialize(args = {})
  @row = args[:row]
  @headers = args[:headers]
  after_init(args)
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



4
5
6
# File 'lib/csv_importable/row_importer.rb', line 4

def headers
  @headers
end

#rowObject (readonly)

Returns the value of attribute row.



4
5
6
# File 'lib/csv_importable/row_importer.rb', line 4

def row
  @row
end

Instance Method Details

#import_rowObject



12
13
14
# File 'lib/csv_importable/row_importer.rb', line 12

def import_row
  # hook for subclasses
end