Help refactor conditional block the Elixir way, please

I like this! Not changing the logic, as @gregvaughn suggested, but nicely broken down into cleaner and more readable parts. Thank you!