In Ruby some methods have a question mark (?
) that ask a question like include?
that ask if the object in question is included, this then returns a
This naming convention is lifted from Scheme.
1.3.5 Naming conventions
By convention, the names of procedures that always return a boolean value usually end in ``?''. Such procedures are called predicates.
By convention, the names of procedures that store values into previously allocated locations (see section 3.4) usually end in ``!''. Such procedures are called mutation procedures. By convention, the value returned by a mutation procedure is unspecified.