Explain the three levels of access control for ruby methods?
Answer / 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 |
What things we can define in the model?
Explain about interpolation?
How would you create getter and setter methods in ruby?
Explain how Symbol is different from variables?
How to access Ruby strings elements in an application?
Explain module mixins in Ruby?
what is the difference extend and include?
What is Ruby programming language?
Tell us how would you implement hash in ruby internally?
How is class methods defined in ruby?
How to write multiline string in Ruby?
Tell me what is the difference between calling super() and super call?