Class: Avo::Concerns::Breadcrumbs::Builder
- Inherits:
-
Object
- Object
- Avo::Concerns::Breadcrumbs::Builder
- Defined in:
- lib/avo/concerns/breadcrumbs.rb
Constant Summary collapse
- DEFAULT_SEPARATOR =
" » ".freeze
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(context, options) ⇒ Builder
constructor
A new instance of Builder.
- #render ⇒ Object
Constructor Details
#initialize(context, options) ⇒ Builder
Returns a new instance of Builder.
27 28 29 30 |
# File 'lib/avo/concerns/breadcrumbs.rb', line 27 def initialize(context, ) @context = context @options = end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
25 26 27 |
# File 'lib/avo/concerns/breadcrumbs.rb', line 25 def context @context end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
25 26 27 |
# File 'lib/avo/concerns/breadcrumbs.rb', line 25 def @options end |
Instance Method Details
#render ⇒ Object
32 33 34 35 |
# File 'lib/avo/concerns/breadcrumbs.rb', line 32 def render separator = .fetch(:separator, DEFAULT_SEPARATOR) .map(&method(:render_element)).join(separator) end |