Map and to_proc to easier capitalize array of strings
["auckland", "christchurch", "wellington", "hamilton", "tauranga", "dunedin", "palmerston north", "hastings", "nelson", "napier", "rotorua", "new plymouth", "whangarei", "invercargill", "wanganui", "gisborne"].map(&:capitalize)
Posted on April 1, 2009 at 10:17 am by Jordan Carter · Permalink
· 2 Comments
In: Uncategorized · Tagged with: blocks, Proc, Rails, Ruby, to_proc
In: Uncategorized · Tagged with: blocks, Proc, Rails, Ruby, to_proc