Explain the three levels of access control for ruby methods?
Answer Posted / Rakhi Shankhdhar
In Ruby, there are three levels of method access control: public (default), private, and protected. Public methods can be accessed from anywhere, while private methods can only be called internally within the class they're defined. Protected methods act similarly to private methods but also allow access from child classes.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers