📅  最后修改于: 2022-03-11 15:04:49.232000             🧑  作者: Mango
In a Ruby class we may want to expose the instance variables (the variables that are defined prefixed by @ symbol) to other classes for encapsulation. ... Getter methods are used to get the value of an instance variable while the setter methods are used to set the value of an instance variable of some class