Add ::set_attributes method