Refactor class_eval blocks

By using `__FILE__` and `__LINE__` here, errors raised in the `eval`’d blocks will be reported as coming from the `mixin.rb` file, not some magical `(eval)` context.