Class: FoundationBuilder

Inherits:
BreadcrumbsOnRails::Breadcrumbs::Builder
  • Object
show all
Defined in:
lib/integral/foundation_builder.rb

Overview

Foundation 6 builder for breadcrumbs :nocov:

Instance Method Summary collapse

Instance Method Details

#renderString

Returns representing the breadcrumb.

Returns:

  • (String)

    representing the breadcrumb



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/integral/foundation_builder.rb', line 5

def render
  output = ''
  output += "<nav aria-label='You are here:' role='navigation'>"
  output += "<ul class='breadcrumbs'>"

  output += @elements.collect do |element|
    render_element(element)
  end.join

  output += '</ul>'
  output += '</nav>'
  output
end