Eratosthenes
A prime number utility based on the sieve of Eratosthenes algorithm.
Installation
Add this line to your application's Gemfile:
gem 'eratosthenes'
Usage
To get an array of all prime numbers up to a given limit:
Eratosthenes::Primes.upto(10) # returns [2, 3, 5, 7]
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/cuppincake/eratosthenes.
License
The gem is available as open source under the terms of the MIT License.