class BreadcrumbTrail::Builder

A Builder that is used by {ActionController::HelperMethods#render_breadcrumbs}. This should be subclassed and implemented.

@abstract

Public Class Methods

new(context, breadcrumbs, options = {}, &block) click to toggle source

Initialize the builder.

@param context [ActionView::Base] The base of the view being

rendered.

@param breadcrumbs [Array<Breadcrumb>] The breadcrumbs to

render.

@param options [Hash] The options for the builder.

# File lib/breadcrumb_trail/builder.rb, line 17
def initialize(context, breadcrumbs, options = {}, &block)
  @context = context
  @breadcrumbs = breadcrumbs
  @options = options
  @block = block
end

Public Instance Methods

call() click to toggle source

Renders the breadcrumbs using the builder. However, since this is the base, it raises an error.

@raise [NotImplementedError] @return [String]

# File lib/breadcrumb_trail/builder.rb, line 29
def call
  raise NotImplementedError
end