How can I distinguish between methods called implicit receiver and variables in Ruby?

I am learning Ruby and have just come across implicit method receivers, for example. when I call a method normalizewithout specifying a receiver, it is interpreted with an implicit receiver as self.normalize.

My question is that someone is reading my code, how can they easily say that normalizethis is a method called by an implicit receiver, and not a variable such as normalize = "normalize"?

It seems to me that both when calling the method normalizeand in the variable normalizethey look the same in the code.

+4
source share
1 answer

=, normalize = "normalize", local - self. . , =.

, , :

. () (normalized_value).

IDE, RubyMine ( ), , , 5 , , , .

0

All Articles