Made PrimeGenerator#prime? a class method