Sha256: 9f51c33b241c723a5680735030eff4322b863f3522030da9977497e2acef4f97
Contents?: true
Size: 656 Bytes
Versions: 2
Compression:
Stored size: 656 Bytes
Contents
module Bunto class PageReader attr_reader :site, :dir, :unfiltered_content def initialize(site, dir) @site = site @dir = dir @unfiltered_content = [] end # 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. 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 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bunto-3.4.5 | lib/bunto/readers/page_reader.rb |
bunto-3.2.1 | lib/bunto/readers/page_reader.rb |