# File lib/rubyful_soup.rb, line 805 def BeautifulStoneSoup.build_tag_map(default, *args) built = args.inject({}) do |m, portion| if portion.is_a? Hash #It's a map. Merge it. portion.each_pair { |k,v| m[k] = v } elsif portion.is_a? Array #It's a list. Map each item to the default. portion.each { |k| m[k] = default } else #It's a scalar. Map it to the default. m[portion] = default end m end end