Please explain the three levels of access control for ruby methods?
Answer / Shashi Bhushan Singh
Ruby methods have three levels of access control: public (accessible everywhere), protected (accessible only within the class and its subclasses), and private (accessible only within the method itself). You can declare these levels using the private, protected, or public keywords.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the scope of a local variable in ruby?
Do you know what is the defined operator?
Explain Ruby if-else statement?
How to create a new time instance in Ruby?
Is ruby supports single inheritance/ multiple inheritance or both?
Explain until loop in ruby.
Tell us what is class libraries in ruby?
how many ways you can create a concatenating string?
How to access Ruby array elements? How many methods are used to access Ruby elements?
Describe the environment variables present in Ruby?
What are the only two values that are falsy?
How would you freeze an object in ruby?