Home
Ruby
ActiveRecord
Array
CGI
Class
Collections
Database
Date
Design Patterns
Development
File Directory
GUI
Hash
Language Basics
Method
Network
Number
Rails
Range
Reflection
Statement
String
Threads
Time
Tk
Unit Test
Windows Platform
XML
Loop through all keys : each_key « Hash « Ruby
Ruby
Hash
each_key
Loop through all keys
zip = { 1 =>
"A"
, 2 =>
"B"
} zip.each_key { |key| print key,
" "
}
Related examples in the same category
1.
each_key method passes only the keys to the block