Intermediate
Ruby
Q76 / 100
What does "Object#instance_variable_get(:@name)" do?
Correct! Well done.
Incorrect.
The correct answer is B) Returns the value of the instance variable @name even if there is no accessor method defined for it
B
Correct Answer
Returns the value of the instance variable @name even if there is no accessor method defined for it
Explanation
instance_variable_get allows reading an instance variable's value by name dynamically, bypassing the need for a getter method.
Progress
76/100