Private at ruby | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Private at ruby

So, functions with private modifier we have to use only by name? Call them with specifying object or instance will raise an error?

29th Jun 2018, 4:04 PM
Александр Тетеро
Александр Тетеро - avatar
2 Answers
+ 2
yes. you have to call private things by name and also it will work till class only.
30th Jun 2018, 10:03 PM
#DARK_PROGRAMMER_✔
#DARK_PROGRAMMER_✔ - avatar
+ 1
Thanks a lot
1st Jul 2018, 5:18 AM
Александр Тетеро
Александр Тетеро - avatar