Created
February 1, 2011 11:14
-
-
Save iNecas/805721 to your computer and use it in GitHub Desktop.
Grouping block arguments example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pscs = { | |
["Brno", "Hradecká"] => [61200,62100], | |
["Brno", "Merhautova"] => [61300,61400], | |
["Brno", "Nezamyslova"] => [61500,63600], | |
} | |
pscs.each do |(city, street), street_pscs| | |
puts "#{street} in #{city} has following PSCs: #{street_pscs.join(", ")}" | |
end | |
# Output: | |
# Hradecká in Brno has following PSCs: 61200, 62100 | |
# Nezamyslova in Brno has following PSCs: 61500, 63600 | |
# Merhautova in Brno has following PSCs: 61300, 61400 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment