在Ruby(甚至更多:Rails)中它是easytomarkmethodsasdeprecated.但是如何将整个类标记为已弃用?我想在使用类时发出警告:classBillingMethodendBillingMethod.new#=>DEPRECATIONWARNING:theclassBillingMethodisdeprecated.UsePaymentMethodinstead.或者当它被用于继承时:classSofortDEPRECATIONWARNING:theclassBillingMethodisdeprecated.UsePaymentMethodinstead.或者