Re: [ANN] traits-0.8.0 - better living through meta-programming
- From: Stefan Lang <langstefan@xxxxxx>
- Date: Mon, 31 Oct 2005 05:32:06 +0900
On Sunday 30 October 2005 21:23, Ara.T.Howard wrote:
> class Car
> positive_int = lambda{|n| Fixnum === x and x > 0}
^ ^
Shouldn't these be "n"?
> legal = proc{|s| s < speed_limit}
>
> trait 'speed_limit', 'validate' => positive_int,
> 'default' => 42 trait 'speed', 'validate' => legal
> end
Regards,
Stefan
.
- Follow-Ups:
- Re: [ANN] traits-0.8.0 - better living through meta-programming
- From: Ara.T.Howard
- Re: [ANN] traits-0.8.0 - better living through meta-programming
- References:
- [ANN] traits-0.8.0 - better living through meta-programming
- From: Ara.T.Howard
- [ANN] traits-0.8.0 - better living through meta-programming
- Prev by Date: Re: [rails] attaching the debugger to functional test.
- Next by Date: Re: "Readability" inflation
- Previous by thread: [ANN] traits-0.8.0 - better living through meta-programming
- Next by thread: Re: [ANN] traits-0.8.0 - better living through meta-programming
- Index(es):