[SOLVED] How to deal with "C: Align the operands of a condition in an unless statement spanning multiple lines" error from Rubocop
Below is the problem statement.C: Align the operands of a condition in an unless statement spanning multiple lines
Rubocop throws this as an error when the operands are not align correctly.Below the simpler way to look at it and how to resolve it.Solution:@bad CodeGet Amazon Gift Cards for your friends and relatives: herefail('Title not Present') unless@good Code
NewPage.page.title1.exists? ||
NewPage.page.title2.exists?fail('Title not Present') unless
NewPage.page.title1.exists? ||
NewPage.page.title2.exists?
Thursday, October 20, 2022
[Solved] How to solve "Align the operands of a condition in an unless statement spanning multiple lines" error
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment