class Tilt::Mapping
def split(file)
def split(file) pattern = file.to_s.downcase full_pattern = pattern.dup until registered?(pattern) return if pattern.empty? pattern = File.basename(pattern) pattern.sub!(/^[^.]*\.?/, '') end prefix_size = full_pattern.size - pattern.size [full_pattern[0,prefix_size-1], pattern] end