def key_for_asset(asset_name)
      match = all_keys_matching(asset_name).sort do |a, b|
        a.string.size <=> b.string.size
      end.first
      match && match.string
    end
def key_for_asset(asset_name)
      match = all_keys_matching(asset_name).sort do |a, b|
        a.string.size <=> b.string.size
      end.first
      match && match.string
    end
Internal: Finds the key for a given asset name (using a Regex). In the
 event of an ambiguous asset_name matching multiple assets, this method
 ranks the matches by their full file path, choosing the shortest (most
 exact) match over all others.

 Returns a String representing the key for the named asset or nil if there
 is no match.