class Jekyll::PageReader
Attributes
dir[R]
site[R]
unfiltered_content[R]
Public Class Methods
new(site, dir)
click to toggle source
# File lib/jekyll/readers/page_reader.rb, line 6 def initialize(site, dir) @site = site @dir = dir @unfiltered_content = [] end
Public Instance Methods
read(files)
click to toggle source
Read all the files in <source>/<dir>/ for Yaml header and create a new Page
object for each file.
dir - The String relative path of the directory to read.
Returns an array of static pages.
# File lib/jekyll/readers/page_reader.rb, line 18 def read(files) files.map do |page| @unfiltered_content << Page.new(@site, @site.source, @dir, page) end @unfiltered_content.select { |page| site.publisher.publish?(page) } end