Skip to content

Commit

Permalink
[Enh]: Fix Issue magritte-metamodel#27: All Option Descriptions Shoul…
Browse files Browse the repository at this point in the history
…d Be Extensible; now MultipleOptionDescriptions can be #extensible, too!

Implementation note: #initializer had to be pushed up, since we need to supply a way to create the new instance. This pushes us a bit closer to my suspicion that #classes for reference descriptions should be #factories, which would probably mean a name-change for #initializer
  • Loading branch information
seandenigris authored and noha committed Aug 8, 2018
1 parent acf0bec commit 039957b
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
validating
validateKind: anObject
super validateKind: anObject.
(anObject allSatisfy: [ :each | self options includes: each ])
ifFalse: [ MAKindError description: self signal: self kindErrorMessage ]
anObject do: [ :e | self validateOptionKind: e ]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing-dynamic
shouldNotInclude: anObject
^ anObject isNil or: [ self options includes: anObject ]
^ self isExtensible not or: [ anObject isNil or: [ self options includes: anObject ] ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
validating
validateOptionKind: anObject
(self options includes: anObject)
ifTrue: [ ^ self ].
self isExtensible
ifTrue: [ self reference validate: anObject ]
ifFalse: [ MAKindError description: self signal: self kindErrorMessage ]

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
validating
validateKind: anObject
super validateKind: anObject.
(self options includes: anObject)
ifTrue: [ ^ self ].
self isExtensible
ifTrue: [ self reference validate: anObject ]
ifFalse: [ MAKindError description: self signal: self kindErrorMessage ]
self validateOptionKind: anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*Magritte-Model
isNumber: aStringOrStream

| stream |
stream := aStringOrStream readStream.
NumberParser parse: stream onError: [ ^ false ].
^ stream atEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "NumberParser"
}

0 comments on commit 039957b

Please sign in to comment.