class Sass::Embedded::LegacyImporter

The {LegacyImporter} for {Embedded#render}.
@deprecated

def canonicalize(url, **_kwargs)

def canonicalize(url, **_kwargs)
  path = Url.file_url_to_path(url)
  canonical_url = Url.path_to_file_url(File.absolute_path(path, (@file.nil? ? 'stdin' : @file)))
  result = @importer.call canonical_url, @file
  raise result if result.is_a? StandardError
  if result&.key? :contents
    @importer_results[canonical_url] = {
      contents: result[:contents],
      syntax: :scss
    }
    canonical_url
  elsif result&.key? :file
    canonical_url = Url.path_to_file_url(File.absolute_path(result[:file]))
    @importer_results[canonical_url] = {
      contents: File.read(result[:file]),
      syntax: :scss
    }
    canonical_url
  end
end

def initialize(importer, file)

def initialize(importer, file)
  super()
  @file = file
  @importer = importer
  @importer_results = {}
end

def load(canonical_url)

def load(canonical_url)
  @importer_results[canonical_url]
end