Module: Webgen::PathHandler::PageUtils

Included in:
Api, Feed, MetaInfo, Page, Sitemap, Template, Virtual
Defined in:
lib/webgen/path_handler/page_utils.rb

Overview

This module should be used by path handlers that need to work with paths in Webgen Page Format.

Note that this modules provides an implementation for the #parse_meta_info! method. If you also include the Base module, make sure that you include it before this module! Also make sure to override this method if you need custom behaviour!

Defined Under Namespace

Classes: Node

Instance Method Summary collapse

Instance Method Details

#create_node(path) ⇒ Object

:nodoc:



128
129
130
131
# File 'lib/webgen/path_handler/page_utils.rb', line 128

def create_node(path) #:nodoc:
  path['node_class'] ||= Node.to_s
  super
end

#parse_meta_info!(path) ⇒ Object

Calls #parse_as_page! to update the meta information hash of path. Returns the found blocks which will be passed as second parameter to the #create_nodes method.



135
136
137
# File 'lib/webgen/path_handler/page_utils.rb', line 135

def parse_meta_info!(path)
  parse_as_page!(path)
end