Class with self method