class ImportBuddy

Public Instance Methods

custom_require_path() click to toggle source
# File lib/sass-buddy.rb, line 89
def custom_require_path
  @custom_require_path ||= options[:require_paths]
end
imports(path, _parent_path) click to toggle source
# File lib/sass-buddy.rb, line 73
def imports(path, _parent_path)
  if path_match(path)
    SassC::Importer::Import.new(path_match(path))
  else
    SassC::Importer::Import.new(path)
  end
end
path_match(path) click to toggle source
# File lib/sass-buddy.rb, line 81
def path_match(path)
  custom_require_path.each do |k, v|
    return File.join(v, path) unless (Regexp.new(k.to_s) =~ path).nil?
  end

  false
end