Add the equivalent of Rails' attr_accessor.