From: Vladimir Fekete Date: 2008-12-01T23:07:40+09:00 Subject: Re: Explanation on some code Hi, It's a HASH - code structure similar to array where you use as index string (and not number). Value of elements in hash are arrays so for example: FILES['some_other_file.html'] will giv you back array: ['other text', 'And even more text'] Cheers, V. P.S. Google: Ruby pragmatic programmer and find hash section On Mon, Dec 01, 2008 at 10:34:08PM +0900, Michael Albers wrote: > Hi, > > Today i looked at ruby for the first time. > > I can't quite figure out what this code is. Could someone give me an > explanation. > > FILES = { > 'some_file.html' => [ > 'Some text', > 'Some more text' > ], > 'some_other_file.html' => [ > 'other text', > 'And even more text' > ], > 'yet_another_file.html' => [ > ['Last text', 2] > ] > } > > Thanks a lot. > -- > Posted via http://www.ruby-forum.com/. > >