---
title: Predicate methods should end with ?
impact: MEDIUM
impactDescription: Make boolean-returning methods immediately recognizable.
tags: ruby, naming, predicate, boolean
---

## Predicate methods should end with ?

Make boolean-returning methods immediately recognizable. Methods that return boolean values should end with a question mark (`?`). Avoid prefixing with auxiliary verbs like `is_`, `does_`, or `can_`.

**Incorrect:**

```ruby
def is_valid
  # logic
end

if user.is_authenticated
  # logic
end
```

**Correct:**

```ruby
def valid?
  # logic
end

if user.authenticated?
  # logic
end
```

**Tools:** RuboCop (`Naming/PredicateName`)
