Learn
The Refactor Factory
Omit Needless Words
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:
- The
unless
on line 6 - The
if
on line 10
Instructions
1.
Refactor the code in the editor to use single-line if
s and unless
s.