I don't feel this should be extracted into a separate method since it is only used in one place. However, we'll probably need to change the way `class_eval` is used in order to in-line it.