class Hash
Public Instance Methods
pushToList(key, value)
click to toggle source
Treat the array as a hash of lists. This method will append ‘value’ to the list at key ‘key’ in the hash. If there is no list for ‘key’, one is created.
# File lib/quartz_torrent/util.rb, line 4 def pushToList(key, value) list = self[key] if ! list list = [] self[key] = list end list.push value end