Examveda

In Ruby, what does the attr_reader method do?

A. Defines a setter method

B. Defines a getter method

C. Defines both getter and setter methods

D. None of the above

Answer: Option B


This Question Belongs to Ruby Programming >> Methods In Ruby

Join The Discussion

Related Questions on Methods in Ruby