A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rubocop/rubocop/issues/14255 below:

consider predicates in method body · Issue #14255 · rubocop/rubocop · GitHub

Is your feature request related to a problem? Please describe.

A new Naming/PredicateMethod cop seems quite useful 😻

I noticed one case that it potentially could catch, but didn't, at the time: the return value is calculated by a predicate. For example:

class File
  def ruby_file
    name.end_with?('.rb')
  end
end

This code doesn't trigger the cop.

Describe the solution you'd like

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4