Vidyalelo
Ruby Programming · Q20

Inheritance and Polymorphism in Ruby

Programming · Ruby Programming · question 20

Q20

What does the attr_accessor method do in Ruby OOP?

A.
Creates constructor methods
B.
Creates only a writer method
C.
Creates only a reader method
D.
Creates both reader and writer methods for class attributes
Answer

Answer: Option D

Solution

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