From: Trans Date: 2007-06-24T09:14:12+09:00 Subject: Re: Named/positional method args On Jun 23, 6:09 pm, darren kirby wrote: > *Sigh*, I mean: > > # Writes embedded images to a file > # > # :call-seq: > # write_picture() -> nil > # write_picture(:outfile=>"str") -> nil > # write_picture(:n=>int) -> nil > # write_picture(:outfile=>"str", :n=>int) -> nil > > -d Bingo. But hey, as Resident Dreamer, I can't help but wonder how cool it might be to have highly descriptive and auto-flexible arguments: def write_picture(n <= Integer, outfile <= String) ... end write_picture("front cover", 1) write_picture(1, "front cover") Sacrifice a little duck-typiness for some arg-flippiness :) T.