Can anyone shed some light on this?
https://github.com/LouHenryAlvarez/jackbox
It looks like some sort of abstraction. But I a having trouble
understanding how this works. Also the following code doesn't make any
sense to me.
<pre>
Furhtermore, these decorators can be re-applied multiple times to the
same receiver:
cup = Coffee.new.enrich(milk).enrich(sprinkles).enrich(sprinkles)
# or even..
cup = Coffee.new.enrich milk, sprinkles, sprinkles
cup.cost.should == 2.10
cup.should be_instance_of(Coffee)
cup.injectors.should == [:milk, :sprinkles, :sprinkles
</pre>
Isn't this sort of thing already possible already. Can someone explain?
Thanks,
Kike