Vidyalelo
Ruby Programming · Q28

Methods in Ruby

Programming · Ruby Programming · question 28

Q28

In Ruby, what does the attr_reader method do?

A.
Defines a setter method
B.
Defines a getter method
Answer
C.
Defines both getter and setter methods
D.
None of the above

Answer: Option B

Solution

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