Class: Prime::EratosthenesGenerator (Ruby 2.3.4) Home Core 2.3.4 Std-lib 2.3.4 Downloads Home Classes Methods In Files prime.rb Parent Prime::PseudoPrimeGenerator Methods ::new #next #rewind #succ Class/Module Index Quicksearch Integer Prime Prime::EratosthenesGenerator Prime::EratosthenesSieve Prime::Generator23 Prime::PseudoPrimeGenerator Prime::TrialDivision Prime::TrialDivisionGenerator No matching classes. Prime::EratosthenesGenerator An implementation of PseudoPrimeGenerator. Uses EratosthenesSieve. Public Class Methods new() # File prime.rb, line 309 def initialize @last_prime_index = -1 super end Public Instance Methods next() Alias for: succ rewind() # File prime.rb, line 318 def rewind initialize end succ() # File prime.rb, line 314 def succ @last_prime_index += 1 EratosthenesSieve.instance.get_nth_prime(@last_prime_index) end Also aliased as: next This page was generated for Ruby 2.3.4 Ruby-doc.org is provided by James Britt and Neurogami. Maximum R+D. Generated with Ruby-doc Rdoc Generator 0.36.0.