Michael Morin
11/7/2008 4:39:00 AM
Greg Hauptmann wrote:
> when should I use ? at the end of a method name?. for queries that
> return (a) boolean value, or (b) any return values? ie any method that
> returns data
>
> Thanks
>
Is the method asking a question or query? By the convention, the method
should has a question or query (some_thread.alive? or
some_string.empty?) and it should work in an if statement. This is only
a convention though, but it could be a little confusing if bend the
rules a little.