class Zenweb::Page::GeneratedIndex
Generates a virtual page with an index of all tags on the given pages. You must subclass and provide a content method.
Attributes
Public Class Methods
Source
# File lib/zenweb/page.rb, line 533 def self.collate_by pages, key, default=nil pages.multi_group_by { |page| page.config[key] || default } end
Source
# File lib/zenweb/page.rb, line 537 def self.generate_all site, dir, pages raise NotImplementedError, "Implement #{self}#generate_all" end
Source
# File lib/zenweb/page.rb, line 545 def initialize site, path, pages super site, path self.pages = pages.select(&:html?) self.date = Time.now site.pages[path] = self end
Calls superclass method
Source
# File lib/zenweb/page.rb, line 541 def self.page_url page # TODO: hard to do helpers on class methods "[#{page.title}](#{page.clean_url})" end
Public Instance Methods
Source
# File lib/zenweb/page.rb, line 554 def content raise NotImplementedError, "Implement #{self.class}#content" end
Source
# File lib/zenweb/page.rb, line 558 def wire super self.depends_on pages end
Calls superclass method
Zenweb::Page#wire