4 ms·
I can see the utility for intervals, but for simple checks I think clarity of intent trumps all. Sometimes if foo.value > bar makes more sense. THis is especial
by ch4s3 11y ago
I can see the utility for intervals, but for simple checks I think clarity of intent trumps all. Sometimes if foo.value > bar makes more sense. THis is especially true when foo is the subject of the method.
Someone already submitted a PR to the Ruby style guide for this, and I can't express how strongly I disagree. https://github.com/bbatsov/ruby-style-guide/pull/546 https://github.com/bbatsov/ruby-style-guide/pull/546