- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
FILE_TYPES_EXTENSIONS.each do |t, e|
if e.include? extension
return t
elsif e.any? {|_e| _e.is_a? Hash}
if _t = e.reduce({}) { |m, x| m = m.merge(x) if x.is_a?(Hash); m }.find{|_t, _e| _e.include? extension}
return retrieve_parent ? t : _t.first
end
end
end
nil