---
title: Boolean Naming Conventions
impact: LOW
impactDescription: improves readability and makes boolean logic intuitive
tags: naming, boolean, readability, conventions, quality
---

## Boolean Naming Conventions

In Ruby, boolean-returning methods (predicates) should always end with a question mark (`?`). Avoid prefixes like `is_` or `has_` except when it makes sense as part of the method name before the `?`.

**Incorrect (vague or non-idiomatic):**

```ruby
def valid
  # returns true/false
end

def is_admin
end
```

**Correct (Ruby idiomatic predicate):**

```ruby
# Standard Ruby Style
def valid?
end

def admin?
end

def has_permission?
end
```

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