Skip to content

Commit aa9ce1c

Browse files
authored
Merge pull request #52 from seandenigris/enh_ma-record-description
[Enh]: Magritte Importer - Make Record Description Configurable
2 parents 9c24c6c + 2cac48a commit aa9ce1c

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

repository/Neo-CSV-Magritte/MACSVImporter.class.st

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Class {
66
'readerClass',
77
'recordClass',
88
'source',
9-
'columnNames'
9+
'columnNames',
10+
'recordMagritteDescription'
1011
],
1112
#category : #'Neo-CSV-Magritte-Visitors'
1213
}
@@ -58,7 +59,7 @@ MACSVImporter >> importStream: aStream [
5859
| fields |
5960
self configureReaderFor: aStream.
6061

61-
fields := self recordClass new magritteDescription children.
62+
fields := self recordMagritteDescription children.
6263
self columnNames
6364
do: [ :h |
6465
fields
@@ -105,6 +106,18 @@ MACSVImporter >> recordClass: aClass [
105106
recordClass := aClass
106107
]
107108

109+
{ #category : #'as yet unclassified' }
110+
MACSVImporter >> recordMagritteDescription [
111+
112+
^ recordMagritteDescription ifNil: [ recordMagritteDescription := self recordClass new magritteDescription ]
113+
]
114+
115+
{ #category : #'as yet unclassified' }
116+
MACSVImporter >> recordMagritteDescription: anMAContainer [
117+
118+
recordMagritteDescription := anMAContainer
119+
]
120+
108121
{ #category : #accessing }
109122
MACSVImporter >> source [
110123

0 commit comments

Comments
 (0)