We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style/EmptyCaseCondition
A new feature, Style/EmptyCaseCondition, was introduced on the version 0.40.0.
Let’s get straight to the point, it doesn't allow us to write like this:
# NG def status case when active? :active when quitted? :quitted when banned? :banned when unconfirmed? :unconfirmed end end
Now, we need to adopt the following style:
# OK def status if active? :active elsif quitted? :quitted elsif banned? :banned elsif unconfirmed? :unconfirmed end end
I've been using the former because someone told me that many elsif looked a bit ugly and I agreed. You can find some similar opinions in the issue.
elsif
What do you think?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A new feature,
Style/EmptyCaseCondition
, was introduced on the version 0.40.0.Let’s get straight to the point, it doesn't allow us to write like this:
Now, we need to adopt the following style:
I've been using the former because someone told me that many
elsif
looked a bit ugly and I agreed.You can find some similar opinions in the issue.
What do you think?
The text was updated successfully, but these errors were encountered: