Classes And Objects In Ruby - Study Mode

[#16] How do you access instance variables in Ruby?
Correct Answer

(B) Using instance methods

[#17] What is the method used to define instance variables in Ruby?
Correct Answer

(A) @variable_name

[#18] Which keyword is used to inherit a class in Ruby?
Correct Answer

(D) <

[#19] What does the super keyword do in Ruby classes?
Correct Answer

(A) Calls the method of the superclass with the same name

[#20] What is the syntax for defining a class method in Ruby?
Correct Answer

(A) def self.method_name