jrochkind/traject — pull request #31 by billdueber (2013-09-19 21:55:50+00:00)
Title: Use real classes for index steps (to_field and each_record)

I would have sworn I already made this pull request...

Anyway, I got sick of the index step being a wishy-washy hash and having weird branching in the processing statements based on to-field or each-record, so I made an index step into a real object that knows how to call its own procs and such.

As a result, calling `#call_procs` on an index step (each_record or to_field) will return the accumulator (which is always empty in the former case), and `#map_to_context` gets simpler because the logic is pushed down into the step objects.

Only two things leak:

* The name of the current step used to be in the context. We don't need it anymore since it's a part of the step itself, and the place it was used (logging) is now an instance method of the object

* ...but now we need access to a logger because it's a new class, so I went ahead an put into the context.