def process_require_tree_directive(path = ".")
if relative?(path)
root = pathname.dirname.join(path).expand_path
unless (stats = stat(root)) && stats.directory?
raise ArgumentError, "require_tree argument must be a directory"
end
context.depend_on(root)
each_entry(root) do |pathname|
if pathname.to_s == self.file
next
elsif stat(pathname).directory?
context.depend_on(pathname)
elsif context.asset_requirable?(pathname)
context.require_asset(pathname)
end
end
else
raise ArgumentError, "require_tree argument must be a relative path"
end
end