Why does a lot of Ruby code seem to have a load of question marks at the end of method names? What does this mean?
At its simplest, the ? has no meaning whatsoever. It’s simply a legal character, like A or b or _.
However, there is a convention that you should add a question mark on the end of methods that return a true or false value.
For example, if you had an invoice, you may have a
paid? method, for a person an
is_logged_in? method and so on.