Class: Yuzu::Renderers::Crumb

Inherits:
Object
  • Object
show all
Defined in:
lib/yuzu/renderers/breadcrumb.rb

Direct Known Subclasses

CategoryCrumb

Instance Method Summary collapse

Constructor Details

#initialize(website_obj, level = 0) ⇒ Crumb

Returns a new instance of Crumb.



123
124
125
126
# File 'lib/yuzu/renderers/breadcrumb.rb', line 123

def initialize(website_obj, level=0)
  @website_obj = website_obj
  @level = level
end

Instance Method Details

#to_sObject



128
129
130
131
132
133
# File 'lib/yuzu/renderers/breadcrumb.rb', line 128

def to_s
  Html::Link.new(
    :href => @website_obj.link_url,
    :class => "breadcrumb_#{@level}"
  ) << @website_obj.name
end