Tell me can you call a private method outside a ruby class using its object?
Answer Posted / Manoj Kumar Rajput
Private methods in Ruby are not accessible outside of the class where they are defined. You cannot directly call a private method on an instance from outside the class. However, there are some workarounds such as using singleton classes or module functions.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers