Class: BreadcrumbTrail::BlockBuilder
- Defined in:
- lib/breadcrumb_trail/builder.rb
Overview
Used along with a block given to the initializer, this renders the breadcrumbs.
Instance Method Summary collapse
-
#call ⇒ String
Creates a buffer, and iterates over every breadcrumb, yielding the breadcrumb to the block given on initialization.
Methods inherited from Builder
Constructor Details
This class inherits a constructor from BreadcrumbTrail::Builder
Instance Method Details
#call ⇒ String
Creates a buffer, and iterates over every breadcrumb, yielding the breadcrumb to the block given on initialization.
43 44 45 46 47 48 49 50 |
# File 'lib/breadcrumb_trail/builder.rb', line 43 def call buffer = ActiveSupport::SafeBuffer.new .each do || buffer << @block.call(.computed(@context)) end buffer end |