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, line 40
def entry_content(entry)
  block_name = self['content_block_name'] || 'content'
  if entry.respond_to?(:render_block) && entry.blocks[block_name]
    entry.render_block(block_name, Webgen::Context.new(tree.website, :chain => [entry])).content
  else
    tree.website.logger.warn { "Feed entry <#{entry}> not used, is not a renderable node" }
    ''
  end
end
feed_entries() click to toggle source

Return the entries for this feed node.

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