On Feb 3, 4:45 ¨Âí¬ Òùáî Äáöé¼òùáîä­ò®®®Àúåîóðéäåò®ãïí¾ ÷òïôåº
> On Feb 2, 2009, at 18:34 , mwlang88 wrote:
>
> >> in other words, why would I want to add 250 lines of dependency code
> >> where 0 seems to suffice?
>
> > As always, depends on where you want to go with it.  ¨Âïò íå÷áîôåä
> > to catch typos immediately much like a compiled language might.
>
> immediately? how? you can't (afaik) do better than a runtime error of > some kind. No different than a const_missing/NameError that you're > going to get with a typo'd constant name.
>
> > I also wanted to associate a display value with a symbol.
>
> #to_s ? #to_html ? #to_whatever ? Maybe I'm not getting your point on > this one.
>
> > And I also wanted to have that be enumerable so I can populate a > > dropdown list or emit radio button groups and checkboxes.
>
> Arrays are already enumerable.
>
>  actual code from png.rb:
>  ¨ÂáãëçòïõîÃïìïò®æòïí °ø°°°°°°°°¢Ôòáîóðáòåîô>  ¨Âìáãë  Ãïìïò®æòïí °ø°°°°°°ÆÆ¢Âìáãë>  ¨ÂìõÃïìïò®æòïí °ø°°°°ÆÆÆÆ¢Âìõå¢
>  ¨Âòï÷î  Ãïìïò®æòïí °ø¹¹¶¶³³ÆÆ¢Âòï÷î>  ¨Âõââìåçõí  Ãïìïò®æòïí °øÆÆ¶¶ÆÆÆÆ¢Âõââìåçõí>  ¨ÂùáÃïìïò®æòïí °ø°°ÆÆÆÆÆÆ¢Ãùáî¢
>  ¨ÂòáÃïìïò®æòïí °ø·Æ·Æ·ÆÆÆ¢Çòáù¢
>  ¨Âòååî  Ãïìïò®æòïí °ø°°ÆÆ°°ÆÆ¢Çòååî>  ¨Âáçåîôá  Ãïìïò®æòïí °øÆÆ°°ÆÆÆÆ¢Íáçåîôá>  ¨ÂòáîçÃïìïò®æòïí °øÆÆ·Æ°°ÆÆ¢Ïòáîçå¢
>  ¨ÂõòðìÃïìïò®æòïí °ø·Æ°°·ÆÆÆ¢Ðõòðìå¢
>  ¨Âåä  Ãïìïò®æòïí °øÆÆ°°°°ÆÆ¢Òåä>  ¨Âèéôå  Ãïìïò®æòïí °øÆÆÆÆÆÆÆÆ¢×èéôå>  ¨ÂåììïÃïìïò®æòïí °øÆÆÆÆ°°ÆÆ¢Ùåììï÷¢
>
> so it would be trivial to do:
>
>  ¨ÂïìïòÛ®®®áìïæ ôèáâïöå®®®>
> ..
> options_from_collection_for_select(Color::Colors, :to_hex, :name)
>
> > Not every case calls for Elemental, but I find that it heightens my
> > code's clarity and maintainability and felt it worthy to release to
> > public domain.
>
> Granted, the doco you have up on github is a tad on the light side, > but I just don't see it. Ruby seems to provide pretty good mechanisms > for everything you're trying to solve.

This is some interesting stuff and you have just shown me a technique/
use of arrays I haven't encountered yet.  Looks like I'm going to have
to take myself back to school here.

Michael