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 |
Do you know how ruby looks up a method to invoke?
Explain the role of modules and mixins in ruby?
What is a struct in ruby?
Tell us what is the difference between dynamic and static scaffolding?
Are numeric objects mutable in ruby?
what is the purpose of the rakefile available in the demo directory in ruby?
Explain about portability?
Explain ampersand parameter (&block) in Ruby?
what is Interpolation in Ruby?
What is a symbol in ruby?
Explain each of the following operators and how and when they should be used: ==, ===, eql?, Equal?
Explain about class libraries in ruby?