Skip to content

Commit

Permalink
[Enh]: Magritte Importer - Make Record Description Configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
seandenigris committed Sep 9, 2024
1 parent 9c24c6c commit 2cac48a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions repository/Neo-CSV-Magritte/MACSVImporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Class {
'readerClass',
'recordClass',
'source',
'columnNames'
'columnNames',
'recordMagritteDescription'
],
#category : #'Neo-CSV-Magritte-Visitors'
}
Expand Down Expand Up @@ -58,7 +59,7 @@ MACSVImporter >> importStream: aStream [
| fields |
self configureReaderFor: aStream.

fields := self recordClass new magritteDescription children.
fields := self recordMagritteDescription children.
self columnNames
do: [ :h |
fields
Expand Down Expand Up @@ -105,6 +106,18 @@ MACSVImporter >> recordClass: aClass [
recordClass := aClass
]

{ #category : #'as yet unclassified' }
MACSVImporter >> recordMagritteDescription [

^ recordMagritteDescription ifNil: [ recordMagritteDescription := self recordClass new magritteDescription ]
]

{ #category : #'as yet unclassified' }
MACSVImporter >> recordMagritteDescription: anMAContainer [

recordMagritteDescription := anMAContainer
]

{ #category : #accessing }
MACSVImporter >> source [

Expand Down

0 comments on commit 2cac48a

Please sign in to comment.