Skip to content

Commit

Permalink
Merge pull request #52 from seandenigris/enh_ma-record-description
Browse files Browse the repository at this point in the history
[Enh]: Magritte Importer - Make Record Description Configurable
  • Loading branch information
seandenigris authored Sep 9, 2024
2 parents 9c24c6c + 2cac48a commit aa9ce1c
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 aa9ce1c

Please sign in to comment.