class Webgen::PathHandler::Feed::Node

Provides custom methods needed for feed nodes.

Public Instance Methods

entry_content(entry) click to toggle source

Return the content of an entry (a Node object) of this feed node.

   # File lib/webgen/path_handler/feed.rb
40 def entry_content(entry)
41   block_name = self['content_block_name'] || 'content'
42   if entry.respond_to?(:render_block) && entry.blocks[block_name]
43     entry.render_block(block_name, Webgen::Context.new(tree.website, :chain => [entry])).content
44   else
45     tree.website.logger.warn { "Feed entry <#{entry}> not used, is not a renderable node" }
46     ''
47   end
48 end
feed_entries() click to toggle source

Return the entries for this feed node.

   # File lib/webgen/path_handler/feed.rb
30 def feed_entries
31   tree.website.ext.node_finder.find(self['entries'], self)
32 end