Examveda

Which method is used to define getter and setter methods for instance variables in Ruby?

A. attr_accessor

B. get_set

C. setter_getter

D. set_get

Answer: Option A


This Question Belongs to Ruby Programming >> Classes And Objects In Ruby

Join The Discussion

Related Questions on Classes and Objects in Ruby