class Foo attr_accessor :answer end foo = Foo.new foo.answer = 42