Add Rubocop with everything turned off
Normalise whitespace
Enforce if/elsif/end alignment
Enable Rubocop rules we already pass
Define methods consistently

Always use () around the arguments. Most definitions were already in
this style.
Exclude some ancillary files from Rubocop
Avoid shadowing block variable
Avoid space between method call and parenthesis
Extract explanatory methods
Indent case/when conventionally
Avoid ambiguous regexp use
Avoid assignment in predicate
Use loop for infinite loops
Enforce no literals in conditions
Prefix unused arguments with _
Use delegate for delegation
Remove defaults from Rubocop config

We only need to specify the places where we deviate from the default.
Use alias_method in preference to alias
End multi-line block with a new line
Use 2 spaces for indentation everywhere

This precludes the 'helper_method def foo' style of defining methods
that are also helper methods in one line, but to be honest that looks
kind of weird to me.