Sha256: 9158973e06b14c4d3b3c842b5fa85958ca0e9d61896abcf5b24731f305ea2a21
Contents?: true
Size: 920 Bytes
Versions: 8
Compression:
Stored size: 920 Bytes
Contents
class PredefinedResourcesTag < Tags::DefaultTag infos( :name => 'WebgenDocu/ResourcesTag', :summary => "Creates a table of all predefined resources" ) register_tag 'predefinedResources' def initialize( pm ) super @process_output = false end def process_tag( tag, chain ) res = @plugin_manager['Core/ResourceManager'].resources output = '<table class="resources" summary="List of predefined resources">' output << '<thead><tr><th>Name</th><th>Type</th><th>Output path</th><th>Description</th></tr></thead>' output << '<tbody>' res.sort.each do |name, r| log(:debug) { "At resource #{r.name}..." } next unless r.predefined log(:debug) { "Describing resource #{r.name}..." } output << "<tr><td>#{r.name}</td><td>#{r.type.to_s}</td><td>#{r.output_path}</td><td>#{r.predefined}</td></tr>" end output << '</tbody></table>' end end
Version data entries
8 entries across 8 versions & 1 rubygems