class Genit::MenuBuilder
Modify menu links.
Public Instance Methods
build_for_page(page_name)
click to toggle source
Public: Build the menu of a particular page.
page_name - The string filename of the page to build menu for.
Returns the modified Nokogiri::XML::Document
# File lib/genit/builders/menu_builder.rb, line 12 def build_for_page page_name build page_name, menu_links end
Private Instance Methods
update(link)
click to toggle source
# File lib/genit/builders/menu_builder.rb, line 22 def update link @path = link['href'] link['id'] = 'selected' if @path == @page_name.force_html_extension end