Robert Klemme <shortcutter / googlemail.com> wrote:

> But the question remains, whether this is a good idea.  Think about it:
> either you do not know keys beforehand.  Then you can only use generic
> algorithms (i.e. query all keys and print their values).  Or you do know
> keys beforehand and then you want to explicitly access individual keys
> (e.g. obj.name).
> 
> If you know the names you can use Struct, e.g.

First, thanks a lot for your answer !

Thats's my case, i know in advance all of the keywords.
In fact i get a String as input, something like :
"name: the_name_value, modification date: the date & time in default
lang, ..."
and i populate a hash :
h[:name] = the_name_value
h[:modification_date] = DateTime of("the date & time in default lang")
et c...

Then, I'll have a look on Struct.
-- 
 ? Je suis s?r que la ga?t? ambigu? du dr?le de gar?on qui a bu du 
whisky et fait le z?bre sur un vieux ca?man ? No?l dans le ca?on, a ?t?
b?n?fique ? l'?me du po?te bl?me, ainsi qu'? son c?ur & c?tera ! ? 
 (? Jean-Paul Blanc)