Class: Anchor::Breadcrumbs::ItemComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/anchor/breadcrumbs/item_component.rb

Constant Summary

Constants included from ViewHelper

ViewHelper::ANCHOR_HELPERS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

generate_id

Methods included from ViewHelper

#anchor_form_with, #anchor_svg, #deep_blank?, #merge_options, #popover_trigger_attributes

Methods included from FetchOrFallbackHelper

#fetch_or_fallback

Constructor Details

#initialize(href: nil, **kwargs) ⇒ ItemComponent

Returns a new instance of ItemComponent.



6
7
8
9
10
11
12
# File 'app/components/anchor/breadcrumbs/item_component.rb', line 6

def initialize(href: nil, **kwargs)
  @href = href
  @active = false
  @show_separator = true

  super(**kwargs)
end

Instance Attribute Details

#activeObject

Returns the value of attribute active.



4
5
6
# File 'app/components/anchor/breadcrumbs/item_component.rb', line 4

def active
  @active
end

#show_separatorObject

Returns the value of attribute show_separator.



4
5
6
# File 'app/components/anchor/breadcrumbs/item_component.rb', line 4

def show_separator
  @show_separator
end