Is there a more efficient way to extract the file extensions in ruby? I currently do the following.
ext = File.basename(filepath).reverse.split(‘.’)[0].reverse
Is there a more efficient way to extract the file extensions in ruby? I currently do the following.
ext = File.basename(filepath).reverse.split(‘.’)[0].reverse