Ruby uses specific naming conventions for methods. It allows you to quickly identify the side effects they may have, or the return type..
These conventions use special markers such as "!" and "?" at the end of method names. This is uncommon since most programming languages tend to forbid such characters in identifiers, but nevertheless, it is truly part of the method name. (and should not be confused with operators)
- Post fixing "?" means that the method returns a boolean. It's a convenient way to replace the "is" prefix. (this convention tends to exist in lisp dialects too)
- Post fixing "!" means that the method will modify the instance, and thus won't act on/return a copy.
Note that these are just conventions. In no way you have to follow it, but it is considered a good practice.