class Zenweb::TagDetail

Generates a virtual page with an index for a given tag on the given pages. You must subclass and provide a content method.

Attributes

tag[RW]

Public Class Methods

all() click to toggle source
# File lib/zenweb/page.rb, line 578
def self.all
  @@all ||= {}
end
generate_all(site, dir, pages) click to toggle source
# File lib/zenweb/page.rb, line 582
def self.generate_all site, dir, pages
  tags_for(pages).sort.each do |tag, pgs|
    path = tag.downcase.gsub(/\W+/, '')
    self.all[tag] = self.new site, "#{dir}/#{path}.html.md.erb", pgs, tag
  end
end
new(site, path, pages, tag) click to toggle source
Calls superclass method Zenweb::GeneratedIndex::new
# File lib/zenweb/page.rb, line 589
def initialize site, path, pages, tag
  super site, path, pages
  self.tag = tag
end

Public Instance Methods

index() click to toggle source
# File lib/zenweb/page.rb, line 594
def index
  self.class.tag_list tag, pages
end