配列の現在の反復の名前を使用して辞書の名前を作成する必要があります。
例えば:
sites = ["google", "facebook", "twitter", "stackoverflow"]
sites.each do |site|
#{site}_success_hash = {} <-- I need the correct syntax for achieving this result.
... populate ... hash
end
したがってgoogle_success_hash
、 などの名前の 4 つのハッシュが必要です。
私はこれを理解することができず、それは私を狂気に駆り立てています。