2008-07-03 detect ruby Enumerable::detect ブロックがtrueに評価した最初の要素を返す hoge == %w(HOGE MOGE FUGA) hoge.detect{|h| h == "HOGE"} HOGE"