# File 'lib/bunto/readers/page_reader.rb', line 4definitialize(site,dir)@site=site@dir=dir@unfiltered_content=[]end
Instance Attribute Details
#dir ⇒ Object(readonly)
Returns the value of attribute dir.
3
4
5
# File 'lib/bunto/readers/page_reader.rb', line 3defdir@dirend
#site ⇒ Object(readonly)
Returns the value of attribute site.
3
4
5
# File 'lib/bunto/readers/page_reader.rb', line 3defsite@siteend
#unfiltered_content ⇒ Object(readonly)
Returns the value of attribute unfiltered_content.
3
4
5
# File 'lib/bunto/readers/page_reader.rb', line 3defunfiltered_content@unfiltered_contentend
Instance Method Details
#read(files) ⇒ Object
Read all the files in // 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.
16
17
18
19
20
21
# File 'lib/bunto/readers/page_reader.rb', line 16defread(files)files.mapdo|page|@unfiltered_content<<Page.new(@site,@site.source,@dir,page)end@unfiltered_content.select{|page|site.publisher.publish?(page)}end