mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Replace redundant Array#map with Array#each (#7761)
Merge pull request 7761
This commit is contained in:
@@ -9,14 +9,13 @@ module Jekyll
|
||||
@unfiltered_content = []
|
||||
end
|
||||
|
||||
# Read all the files in <source>/<dir>/ for Yaml header and create a new Page
|
||||
# object for each file.
|
||||
# Create a new `Jekyll::Page` object for each entry in a given array.
|
||||
#
|
||||
# dir - The String relative path of the directory to read.
|
||||
# files - An array of file names inside `@dir`
|
||||
#
|
||||
# Returns an array of static pages.
|
||||
# Returns an array of publishable `Jekyll::Page` objects.
|
||||
def read(files)
|
||||
files.map do |page|
|
||||
files.each do |page|
|
||||
@unfiltered_content << Page.new(@site, @site.source, @dir, page)
|
||||
end
|
||||
@unfiltered_content.select { |page| site.publisher.publish?(page) }
|
||||
|
||||
Reference in New Issue
Block a user