Vidyalelo
Ruby Programming · Q22

Inheritance and Polymorphism in Ruby

Programming · Ruby Programming · question 22

Q22

What is the significance of the attr_writer method in Ruby classes?

A.
Defines only reader methods for class attributes
B.
Defines only writer methods for class attributes
Answer
C.
Defines constructor methods for class attributes
D.
None of the above

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board