--- a/RGCommentDefinition.st Fri Aug 28 12:21:13 2015 +0100
+++ b/RGCommentDefinition.st Fri Aug 28 14:04:03 2015 +0100
@@ -28,7 +28,7 @@
self isActive
ifTrue: [ ^ self realClass organization classComment ].
self isHistorical
- ifTrue: [ ^ self contentAtPointer ifNil:[ self realClass ifNil:[ content ] ifNotNil:[ :rc| rc organization classComment ] ] ].
+ ifTrue: [ ^ self contentAtPointer ifNil:[ | rc | (rc := self realClass) ifNil:[ content ] ifNotNil:[ rc organization classComment ] ] ].
^ content
!
@@ -55,7 +55,7 @@
self isActive
ifTrue: [ ^ self realClass organization commentStamp ].
self isHistorical
- ifTrue: [ ^ self stampAtPointer ifNil:[ self realClass ifNil:[ stamp ] ifNotNil:[ :rc| rc organization commentStamp ] ] ].
+ ifTrue: [ ^ self stampAtPointer ifNil:[ | rc | (rc := self realClass) ifNil:[ stamp ] ifNotNil:[ rc organization commentStamp ] ] ].
^ stamp
!
@@ -225,8 +225,9 @@
self sourcePointer ifNil:[
realClass := self realClass.
realClass notNil ifTrue: [
- realClass organization commentRemoteString
- ifNotNil: [:str | self sourcePointer: str sourcePointer ] ] ]
+ | str |
+ (str := realClass organization commentRemoteString)
+ ifNotNil: [ self sourcePointer: str sourcePointer ] ] ]
!
asPassive
@@ -257,26 +258,32 @@
!
isActive
+ "A ring comment isActive when it needs to access the class organization for retrieving its data"
- "A ring comment isActive when it needs to access the class organization for retrieving its data"
- ^(self annotationNamed: self class statusKey)
+ | status |
+
+ ^(status := self annotationNamed: self class statusKey)
ifNil:[ false ]
- ifNotNil:[ :status| status == #active ]
+ ifNotNil:[ status == #active ]
!
isHistorical
+ "A ring comment can be used to point an old version of the receiver, in this case it will use the sourcePointer to retrieve its information"
- "A ring comment can be used to point an old version of the receiver, in this case it will use the sourcePointer to retrieve its information"
+ | status |
+
^(self annotationNamed: self class statusKey)
ifNil:[ false ]
- ifNotNil:[ :status| status == #historical ]
+ ifNotNil:[ status == #historical ]
!
isPassive
+ "A ring comment isPassive by default. In this case it will retrieve the data that was assigned in its creation"
- "A ring comment isPassive by default. In this case it will retrieve the data that was assigned in its creation"
- ^(self annotationNamed: self class statusKey)
+ | status |
+
+ ^(status := self annotationNamed: self class statusKey)
ifNil:[ true ]
- ifNotNil:[ :status| status == #passive ]
+ ifNotNil:[ status == #passive ]
! !