From: John W Higgins Date: 2009-09-17T02:21:47+09:00 Subject: Re: Array of Hashes in an array of hashes - Complicated! --0016e646a47412552c0473b52210 Content-Type: text/plain; charset=ISO-8859-1 Matt, On Wed, Sep 16, 2009 at 9:32 AM, Matt Brooks wrote: > > > 3.) Also, If I wanted to print all key value pairs in the @variables, in > an understandable format just to prove and see that they are all there, > how would you do that, without first knowing which variables were stored > that time around. > > Would I iterate through @variables ? for all the names, and through > @values for all the values? I guess I don't fully understand how the > embedded array of repeating fields is arranged and where it is located > within @values and @variables. So how would you also handle printing > that embedded second array of repeating values and names? > > If this is just for testing and you just want the info on the command line then you could just go with something like require 'pp' and then inside the class add def show_variables() pp @variables #This gives one blob of data #or @variables.each{ |var| pp var } #This will break each variable onto a line with [ key, value ] symantics end This will give you a "nice" output of what the data is inside the variable list. John --0016e646a47412552c0473b52210--