method
filter_by
v3.0.0 -
Show latest stable
- Class:
Rails::Paths::Root
filter_by(constraint)protected
No documentation available.
# File railties/lib/rails/paths.rb, line 65
def filter_by(constraint)
all = []
all_paths.each do |path|
if path.send(constraint)
paths = path.paths
paths -= path.children.values.map { |p| p.send(constraint) ? [] : p.paths }.flatten
all.concat(paths)
end
end
all.uniq!
all.reject! { |p| !File.exists?(p) }
all
end