Skip to content

Commit 054ed33

Browse files
authoredDec 17, 2023
Update CoolSnippets.md
Fixed some English and expanded the explanation
1 parent e51bf82 commit 054ed33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎General/CoolSnippets.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ To get a specific icon, use `#iconNamed:` method as follow:
9797
Smalltalk ui icons iconNamed: #arrowUp
9898
```
9999

100-
## Rename programatically methods
100+
## Rename methods programatically
101101

102-
In this section we'll present a snippet of code to rename all the methods of a class containing a substring to replace it by another substring.
102+
In this section we will present a code snippet to rename all methods of a class by replacing one substring with another. First, we find all methods of a given class with names that contain a substring `A`, then we rename those methods to replace `A` with another substring `B`.
103103

104104
```Smalltalk
105105
"Class in which we want to rename the methods"
@@ -123,7 +123,7 @@ class methods
123123
permutation: permutationMap) execute ]
124124
```
125125

126-
> Be careful, this will also rename the senders of those methods and if you have two methods of the same name in the image, it might badly rename some. Use this only on methods with unique names.
126+
> Be careful, this will also rename the senders of those methods and if you have two methods with the same name in the image, it might badly rename some of them. Use this only on methods with unique names.
127127
128128
## Get all senders/implementors of a selector
129129
The selector of a method is kind of the equivalent of the signature of a method or function in other programming languages.

0 commit comments

Comments
 (0)
Please sign in to comment.