class Marsdawn::Site::Breadcrumb
Public Class Methods
new(site, crumb)
click to toggle source
# File lib/marsdawn/site/breadcrumb.rb, line 6 def initialize site, crumb @site = site crumb.each do |path| self[path] = Marsdawn::Site::Link.new(@site, path) end end
Public Instance Methods
to_html()
click to toggle source
# File lib/marsdawn/site/breadcrumb.rb, line 17 def to_html words = [] if self.size > 0 words << '<ul>' self.each do |uri, link| words << "<li>#{link.to_html}</li>" end words << '</ul>' end words.join('') end
to_s()
click to toggle source
# File lib/marsdawn/site/breadcrumb.rb, line 13 def to_s to_html end