Class: Webgen::TestHelper::RenderNode
- Inherits:
-
PathHandler::PageUtils::Node
- Object
- Node
- PathHandler::Base::Node
- PathHandler::PageUtils::Node
- Webgen::TestHelper::RenderNode
- Defined in:
- lib/webgen/test_helper.rb
Overview
A special subclass of Webgen::Node that is used in testing when a “renderable” node is needed, ie. one that has the necessary info set to be processed via Webgen::PathHandler::PageUtils.
Instance Attribute Summary
Attributes inherited from Node
#acn, #alcn, #children, #cn, #dest_path, #lang, #lcn, #level, #meta_info, #node_info, #parent, #tree
Instance Method Summary collapse
-
#initialize(page_data, parent, cn, dest_path, meta_info = {}) ⇒ RenderNode
constructor
A new instance of RenderNode.
- #template_chain ⇒ Object
Methods inherited from PathHandler::PageUtils::Node
Methods inherited from PathHandler::Base::Node
#content, #link_to, #route_to, #url
Methods inherited from Node
#=~, #[], #inspect, #is_ancestor_of?, #is_directory?, #is_file?, #is_fragment?, #is_root?, #link_to, #proxy_node, #resolve, #route_to, #to_s, #versions
Constructor Details
#initialize(page_data, parent, cn, dest_path, meta_info = {}) ⇒ RenderNode
Returns a new instance of RenderNode.
28 29 30 31 32 33 34 |
# File 'lib/webgen/test_helper.rb', line 28 def initialize(page_data, parent, cn, dest_path, = {}) super(parent, cn, dest_path, ) page = Webgen::Page.from_data(page_data) self.node_info[:blocks] = page.blocks self.node_info[:path_handler] = self self..update(page.) end |
Instance Method Details
#template_chain ⇒ Object
36 37 38 |
# File 'lib/webgen/test_helper.rb', line 36 def template_chain [self] end |