Class: SwedbankPay::SidebarTreeBuilder
- Inherits:
-
Object
- Object
- SwedbankPay::SidebarTreeBuilder
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/sidebar_tree_builder.rb
Overview
Arranges Sidebar pages into a tree
Instance Method Summary collapse
-
#initialize(pages) ⇒ SidebarTreeBuilder
constructor
A new instance of SidebarTreeBuilder.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(pages) ⇒ SidebarTreeBuilder
Returns a new instance of SidebarTreeBuilder.
14 15 16 17 18 19 20 |
# File 'lib/sidebar_tree_builder.rb', line 14 def initialize(pages) raise ArgumentError, 'pages cannot be nil' if pages.nil? raise ArgumentError, 'pages must be a Hash' unless pages.is_a? Hash @tree = tree(pages) enrich_jekyll_pages(@tree) end |
Instance Method Details
#inspect ⇒ Object
26 27 28 |
# File 'lib/sidebar_tree_builder.rb', line 26 def inspect stringify(inspection: true) end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/sidebar_tree_builder.rb', line 22 def to_s stringify end |