codeclimate/codeclimate-rubocop

View on GitHub
config/contents/style/if_unless_modifier_of_if_unless.md

Summary

Maintainability
Test Coverage
Checks for if and unless statements used as modifiers of other if or
unless statements.

### Example:

 # bad
 tired? ? 'stop' : 'go faster' if running?

 # bad
 if tired?
     "please stop"
 else
     "keep going"
 end if running?

 # good
 if running?
     tired? ? 'stop' : 'go faster'
 end