...

>

Predicate Methods

Predicate Methods

Learn about the predicate methods in Ruby and how to use them.

Predicate methods

If we look at the list of methods defined for a String object, we see that there are methods that end with a question mark (?).

In Ruby convention, these methods return either true or false. For example, we ...