mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Allow to inspect a directory
This commit is contained in:
parent
a8c6ac6efd
commit
ca502754b6
1 changed files with 5 additions and 4 deletions
|
@ -83,9 +83,10 @@ module Ameba
|
||||||
end
|
end
|
||||||
|
|
||||||
private def load_sources(config)
|
private def load_sources(config)
|
||||||
config.files
|
config.files.map do |wildcard|
|
||||||
.map { |wildcard| Dir[wildcard] }
|
wildcard += "/**/*.cr" if File.directory?(wildcard)
|
||||||
.flatten
|
Dir[wildcard]
|
||||||
|
end.flatten
|
||||||
.map { |path| Source.new File.read(path), path }
|
.map { |path| Source.new File.read(path), path }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue