Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: RubyTraits 0.1
Yukihiro Matsumoto
10/15/2007 4:56:00 PM
Hi,
In message "Re: RubyTraits 0.1"
on Tue, 16 Oct 2007 01:49:05 +0900, Daniel Berger <djberg96@gmail.com> writes:
|> If someone come to the idea to allow modules to have merits from both
|> mixins and traits at once (without demerit), I'd love to hear.
|
|I solved this "problem" over two years ago with fine grained mixins.
|Please see
http://rubyforge.org/docman/view.php/735/309/R...
|and look at the synopsis. Ideas (and code) in that library also came
|from Ara Howard and Mauricio Fernandez.
Pardon my ignorance. I will check the code.
matz.
3 Answers
Daniel Berger
10/15/2007 5:24:00 PM
0
On Oct 15, 10:55 am, Yukihiro Matsumoto <m...@ruby-lang.org> wrote:
> Hi,
>
> In message "Re: RubyTraits 0.1"
> on Tue, 16 Oct 2007 01:49:05 +0900, Daniel Berger <djber...@gmail.com> writes:
>
> |> If someone come to the idea to allow modules to have merits from both
> |> mixins and traits at once (without demerit), I'd love to hear.
> |
> |I solved this "problem" over two years ago with fine grained mixins.
> |Please see
http://rubyforge.org/docman/view.php/735/309/R...
> |and look at the synopsis. Ideas (and code) in that library also came
> |from Ara Howard and Mauricio Fernandez.
>
> Pardon my ignorance. I will check the code.
No pardon required. :)
BTW, I uploaded some more examples here:
http://rubyforge.org/docman/view.php/735/2472/exa...
Regards,
Dan
Phrogz
10/15/2007 8:11:00 PM
0
On Oct 15, 11:23 am, Daniel Berger <djber...@gmail.com> wrote:
> BTW, I uploaded some more examples here:
>
>
http://rubyforge.org/docman/view.php/735/2472/exa...
I think you have a minor typo:
class Bar
use Mod_B, :include => [:meth_b, :meth_c] # include only 'meth_a'
and 'meth_b'
use Mod_B, :exclude => :meth_c # same net result as
above
end
Shouldn't that be :exclude => :meth_a instead, to get the same net
result?
Daniel Berger
10/15/2007 9:51:00 PM
0
On Oct 15, 2:15 pm, Phrogz <phr...@mac.com> wrote:
> On Oct 15, 11:23 am, Daniel Berger <djber...@gmail.com> wrote:
>
> > BTW, I uploaded some more examples here:
>
> >
http://rubyforge.org/docman/view.php/735/2472/exa...
>
> I think you have a minor typo:
>
> class Bar
> use Mod_B, :include => [:meth_b, :meth_c] # include only 'meth_a'
> and 'meth_b'
> use Mod_B, :exclude => :meth_c # same net result as
> above
> end
>
> Shouldn't that be :exclude => :meth_a instead, to get the same net
> result?
It should be ":include => [:meth_a, :meth_b]"
Fixed at
http://rubyforge.org/docman/view.php/735/2472/exa...
.
Thanks,
Dan
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: RubyTraits 0.1
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password