
18 Nov
2004
18 Nov
'04
11:57 a.m.
Joel de Guzman wrote:
1) WRT DSL, I'm not quite sure about the syntax for defaults. Example:
params[name | "unnamed"]
I have a strong feeling that there's a better syntax but I am not sure what it is now. I read in the thread that the syntax
params[name] | "unnamed"
is not doable, but I'm not quite sure. Perhaps a clarification will set me straight. Having the default in the brackets seems to rather awkward. Perhaps:
params[name].defaults_to("unnamed")
is better?
FWIW, I like the current syntax.