class Sprockets::DirectiveProcessor

def process_require_directory_directive(path = ".")


//= require_directory "./javascripts"

nested directories.
directory. It's similar to `path/*` since it does not follow
`require_directory` requires all the files inside a single
def process_require_directory_directive(path = ".")
  if relative?(path)
    root = pathname.dirname.join(path).expand_path
    unless (stats = stat(root)) && stats.directory?
      raise ArgumentError, "require_directory argument must be a directory"
    end
    context.depend_on(root)
    entries(root).each do |pathname|
      pathname = root.join(pathname)
      if pathname.to_s == self.file
        next
      elsif context.asset_requirable?(pathname)
        context.require_asset(pathname)
      end
    end
  else
    # The path must be relative and start with a `./`.
    raise ArgumentError, "require_directory argument must be a relative path"
  end
end