Note that method_missing is not used here. Because we know in advance which validation methods exist, we only create methods for those validations.
In this particular case, the methods also have different arity, so two separate class evals are used, one for methods that accept an additional argument, and one for methods that do not.
In both cases, the methods created via metaprogramming just call the appropriate validation method on the object for the given attribute.
Any questions about this class, or on how to choose between using metaprogramming to create real methods or just using method_missing?