Examveda

In Ruby, which method is used to define a getter and setter for an instance variable?

A. get_set

B. attr

C. read_write

D. instance

Answer: Option B


This Question Belongs to Ruby Programming >> Methods In Ruby

Join The Discussion

Related Questions on Methods in Ruby