Maybe you can use [attr_accessor] to define writer and reader

Test case is green.