Class: SwedbankPay::SidebarRenderer
- Inherits:
-
Object
- Object
- SwedbankPay::SidebarRenderer
- Defined in:
- lib/sidebar_renderer.rb
Overview
Renders the Sidebar
Instance Method Summary collapse
- #enrich_jekyll ⇒ Object
-
#initialize(tree) ⇒ SidebarRenderer
constructor
A new instance of SidebarRenderer.
- #render ⇒ Object
Constructor Details
#initialize(tree) ⇒ SidebarRenderer
Returns a new instance of SidebarRenderer.
9 10 11 12 13 14 15 |
# File 'lib/sidebar_renderer.rb', line 9 def initialize(tree) raise ArgumentError, 'pages cannot be nil' if tree.nil? raise ArgumentError, 'pages must be an SidebarTreeBuilder' unless tree.is_a? SidebarTreeBuilder @tree = tree @html_builder = SidebarHTMLBuilder.new(@tree) end |
Instance Method Details
#enrich_jekyll ⇒ Object
17 18 19 |
# File 'lib/sidebar_renderer.rb', line 17 def enrich_jekyll enrich_jekyll_pages(@tree) end |
#render ⇒ Object
21 22 23 |
# File 'lib/sidebar_renderer.rb', line 21 def render render_pages(@tree) end |