Predefined method chains
Ruby core library has many methods that accept names of other methods to do their job. Examples are private, public, private_class_method, module_function etc. Many gem also incorporate this approach in their codebase. Memery example:
See this method that deals with result. Let's try to do something similar.
The problem we are going to address is to run validations on new ActiveRecord object. We call it verify
Then we need to add custom validator for that. It should accept multiple objects and copy errors.
Then we can do the following
Looks a bit strange, but compact )))