0

On the Chef Style Guide page appears this Ruby expression:

antarctica_hint = hint?('antarctica')

What exactly does the ? after hint and before ('antarctica') mean? Is it just part of the method name? (i.e. the method is called 'hint?' not 'hint')

David
  • 14,569
  • 34
  • 78
  • 107

1 Answers1

6

It is part of method name, and people typically (not always) use it for methods that return boolean value.

An example from Ruby is Class#respond_to?

Wand Maker
  • 18,476
  • 8
  • 53
  • 87