On Sep 18, 6:19 pm, John Do <[EMAIL PROTECTED]> wrote:

> The #<blah key1: value1, key2: value2 ...> comes from YAML. There's no
> way to pull out all the keys?
>
Well you can certainly just dump instance variables from the object
(which is probably what yaml does most of the time)

> I know if the yaml file doesn't contains - !ruby/object:RmEnv, YAML.load
> will create a hash #<key1: value1, key2: value2 ...> which I can loop
> through with each_key.
>
> If it's a ruby object, I'm out of luck?
>
Not so much out of look, most objects just don't have a way for
iterating over all their properties (for whatever definition of
properties they have)

> The data is just a database dump of a Rail Model RmEnv where keys are
> the db field and the values their values.
>
You might be better off dumping the attributes of your activerecord
objects rather then the whole thing.

Fred


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to