Home / Programming MCQs / Ruby MCQs / Question
M
Q. What does the private keyword do in a Ruby class?
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
What will any variable evaluate to if it is of Boolean data type?
The elsif statement can add many alternatives to if/else statements.
What does inheritance allow in OOP?
What will be the output of the given code?
In Ruby, which method is used to define getter and setter methods for class attributes?
What is the result of the expression: 5 / 2 in Ruby?
Which command is commonly used to generate a new RSpec test file?
What is the output of the given code? i=1 for i in 5..10 puts i^2 end
Discusssion
Login to discuss.