Vidyalelo
Ruby Programming · Q38

Object Oriented Programming (OOP) Concepts in Ruby

Programming · Ruby Programming · question 38

Q38

In Ruby, which method is used to define getter and setter methods for class attributes?

A.
attr_accessor
Answer
B.
get_set
C.
reader_writer
D.
attr_reader

Answer: Option A

Solution

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