One of the most common suggestions when it comes to writing is to omit needless words, and it applies just as much to writing Ruby as writing stories.
There are two control structures to change here:
unlesson line 6
ifon line 10
Refactor the code in the editor to use single-line