Sha256: 4cf94a3f5e553fe00a68f9cbbc325e7b7059f65a58480b89ab390bbc5fd17c15
Contents?: true
Size: 1.25 KB
Versions: 3
Compression:
Stored size: 1.25 KB
Contents
module RulesView module Navigate def re_breadcrumbs *links return if links.empty? result = ''.html_safe result << '<div class="re-breadcrumbs">'.html_safe links[0 ... -1].each do |link| result << link result << "<span class='re-breadcrumbs-seperator'>></span>".html_safe end result << "<em>".html_safe result << links[-1] result << "</em>".html_safe # result << "<span class='re-breadcrumbs-seperator'>></span>" if links[-1] == links[0] result << '</div>'.html_safe result end def re_breadcrumbs_right *links return if links.empty? result = ''.html_safe result << '<div class="re-breadcrumbs">'.html_safe links[0 ... -2].each do |link| result << link result << "<span class='re-breadcrumbs-seperator'>></span>".html_safe end result << "<em>".html_safe result << links[-2] result << "</em>".html_safe # result << "<span class='re-breadcrumbs-seperator'>></span>" if links[-2] == links[0] result << "<div class='re-breadcrumb-right'>".html_safe result << links[-1] result << "</div>".html_safe result << '</div>'.html_safe result end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rules_view-0.0.3 | lib/rules_view/navigate.rb |
rules_view-0.0.2 | lib/rules_view/navigate.rb |
rules_view-0.0.1 | lib/rules_view/navigate.rb |