[SOLVED] How to deal with "C: Indent when one step more than case." error from Rubocop
Below is the problem statement.
Problem:
C: Indent when one step more than case.
Rubocop throws this as an error when we have a indentation issue.
Ruby scripts have indentated code and a missing indentation makes compiler grumpy. To resolve it we just need to have a space before starting the when clause.
Below the simpler way to look at it and how to resolve it.
Solution:
@bad Code case platform.downcase when 'android' @good Code case platform.downcaseGet Amazon Gift Cards for your friends and relatives: here
when 'android'
No comments:
Post a Comment