Replace eigenclass with define_singleton_method