为实例变量创建
attr_writer
声明。
attr_writer
是定义写入器方法的语法糖,它相当于编写以下内容:
class Foo def foo=(foo) @foo = foo end end