Jacob Fugal
3/21/2006 5:11:00 PM
On 3/21/06, Tony <tony.moutaux@igbmc.u-strasbg.fr> wrote:
> Hi Ruby-rulez !
>
> I often look at some code, for example un rails/active_record, where
> functions name end with a ? or a !
>
> Is this a special notation, meaning that the func or args or whatever
> have some treatment before/after the body ? Or to show that the function
> return a boolean (?) and the arg modified (!) ?
The latter. The ? and ! characters in a method name have absolutely no
import to the parser/interpreter (well, no more import than does any
other character such as 'f' or 'q'). They only serve, by convention,
as an indicator to the programmer of the behavior of the method.
Jacob Fugal