Refactoring 0: Remove Unneeded Code

Take out the tests for generate_array() as we are going to remove that method.
Also, remove the contains?() method as it was only used by generate_array tests.
Refactoring 1: Rename Method

Change the name of the specs to take out the "Test X" numbering
and take out "List" as it's redundant.
Refactoring 2: Add a Test

Renamed 'Single' test to be 'ZeroTwo' and added test 'ZeroOne'.
Now we test the edge cases: 0, 1 and 2.
Refactoring 3: Hide Method

generate_array() is now marked as private as it's only called by generate()
Refactoring 4: Replace Nested Conditional with Guard Clauses

Instead of a big if-else block, the edge case (less than 2) is
now handled as a guard clause so the rest of the method is just the
normative cases: where max_value is 2 or more.
Refactoring 5: Inline Method

Normally you would look for 'Extract Method' opportunities, but given
that we will refactor this more, it makes sense to Inline the private method
into the public method. Then we can refactor it more as we go.
NOTE: you could wait on this Inline Method refactoring until later, keeping the
other refactorings happening in the private method.
Refactoring 6: Rename Variable

Renamed 'f' to 'is_prime' to be more descriptive. Also enabled us to remove
extraneous comments.
Refactoring 7: Collapse Loops

Instead of building a temporary array in one loop then iterating through it
to add primes to result, we can just directly add primes to the result, thus
removing one of the loops.
Refactoring 8: Remove Dead Code

The 'count' variable isn't needed anymore so that loop can be removed.
Refactoring 9: Collapse Loops (Again)

We can add a check clause in the sieve to skip the inner loop
if the is_prime array returns false for that number.
Refactoring 9: Collapse Loops (One More Time)

Collapsing the loops again and redoing the outer iteration. It may or may not
be more efficient, but it's a single loop now.
Refactoring 10: Reduce Local Variable Scope (no-op)

This is a no-op commit as Ruby already had 'j' scoped as local as it needed to be.
The original C# code had scoped 'j' outside of the outer loop.
Refactoring 11: Replace Temp with Query (Actually Variable)

We ended up with a well-named variable instead of a query because
Ruby Arrays don't have a fixed length at declaration. This is still
a good refactor because 's' was a meaningless variable name, but
'is_prime_size' is a more meaningful name.
Refactoring 12: Remove Dead Code

is_prime is now initialized as 'false' by default for array values.
So we are able to remove the settings for 0 and 1.
Refactoring 13: Extract Method

The comment was a clue that there was an opportunity to extract funtionality
into a private method for clarity's sake. Note that due to Ruby's dynamically
sizing of Arrays, we need to pass in the is_prime_size variable.
Refactoring 14: Extract Method (Again)

Pull the sieve calculation loop into a private method. Again, due to
Ruby Arrays not being declared with a length, we need to pass in the size
variable as well as the other variables.
Refactoring 14: Extract Method (Again) (additional refactoring)

result Array is now only needed in the sieve method.
Refactoring 15: Reduce Local Variable Scope (no-op)

Refactoring in C# is to move the iterator variable to be locally scoped,
but in Ruby that doesn't matter. However, we changed the iteration to be
a single line.
Refactoring 16: Convert Procedural Design to Objects

The public interface is still the class method generate() but internally
it now builds an instance of Primes to hold the array of primes and size variables.
Then the internal method calls don't need to pass these values.
NOTE: sieve() needs to be made public so that the class method can access it.
Refactoring 17: Keep the Data Close to Where It Is Used

Moved the guard clause to be in the sieve() method.