Can you call a private method outside a ruby class using its object?
Answer / Vishal Jane
No, private methods in Ruby can only be called within the same class where they are defined. They cannot be accessed or invoked from outside of the class or even by its objects.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the use of global variable $ in Ruby?
What function converts all html special symbols to html entities in ruby?
What things we can define in the model?
Tell us what is the difference between dynamic and static scaffolding?
Explain ruby ranges. What are the ways to define ranges?
Can method names be capitalized?
How to create a new time instance in Ruby?
Can you call a private method outside a ruby class using its object?
How would you freeze an object in ruby?
Tell me how would you freeze an object in ruby? Can you provide a simple example?
What are ruby blocks.
What is Ruby programming language?