Parent

Methods

Included Modules

Class/Module Index [+]

Quicksearch

Webgen::Tag::Metainfo

Provides easy access to the meta information of a node.

Public Instance Methods

call(tag, body, context) click to toggle source

Return the meta information key specified in tag of the content node.

# File lib/webgen/tag/metainfo.rb, line 11
def call(tag, body, context)
  output = ''
  if tag == 'lang'
    output = context.content_node.lang
  elsif context.content_node[tag]
    output = context.content_node[tag].to_s
    output = CGI::escapeHTML(output) if param('tag.metainfo.escape_html')
  else
    log(:error) { "No value for meta info key '#{tag}' in <#{context.ref_node}> found in <#{context.content_node}>" }
  end
  output
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.