Sha256: 79fde5f665c97b0531ccfe831518c39854f0c382d603dbf2c774a2749058d671
Contents?: true
Size: 678 Bytes
Versions: 2
Compression:
Stored size: 678 Bytes
Contents
# frozen_string_literal: true class Breadcrumbs module Render class Base # :nodoc: all include ::ActionView::Helpers::TagHelper attr_accessor :breadcrumbs, :default_options, :output_buffer def initialize(breadcrumbs, default_options = {}) @breadcrumbs = breadcrumbs @default_options = default_options end def tag(name, content = "", options = {}, &block) content_tag(name, content, options, &block) end protected def wrap_item(url, text, options) if url tag(:a, text, options.merge(href: url)) else tag(:span, text, options) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
breadcrumbs-0.3.0 | lib/breadcrumbs/render/base.rb |
breadcrumbs-0.2.0 | lib/breadcrumbs/render/base.rb |