Mega Code Archive

 
Categories / Ruby / Hash
 

The variable storing the hash is dictionary, and it contains two entries

dictionary = { 'cat' => 'feline animal', 'dog' => 'canine animal' } puts dictionary.size