Skip to content

Commit

Permalink
Adding another executable comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse committed Sep 15, 2019
1 parent 9236cab commit ca87b87
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/Collections-Strings/Symbol.class.st
Expand Up @@ -418,9 +418,16 @@ Symbol >> asAnnouncement [

{ #category : #converting }
Symbol >> asMutator [
"Return a setter message from a getter message. For example,
#name asMutator returns #name:
return self if it is already a setter"
"Return a setter message from a getter message.
Return self if it is already a setter.
Pay attention the implementation should be improved to return valid selector."

"#name asMutator >>> #name:"
"#name: asMutator >>> #name:"

"#_ asMutator >>> #_:"
"#foo:: asMutator >>> #'foo::'"

self endsWithAColon ifTrue:[ ^ self ].
^ (self copyWith: $:) asSymbol
]
Expand Down

0 comments on commit ca87b87

Please sign in to comment.