Okay, I see. Sorry I did not think about this properly before.
Ok then, do this, but make the ridge you add a class variable that one can set (not through constructor though, give it a default value). And then check whether some eigenvalues are too small, and then print a warning in which you suggest to drop that dimension via PCA.
"Covariance matrix has zero Eigenvalues at dimension %d. Consider reducing its dimension. Adding %f to avoid numerical problems"