Class: Practical::Views::Navigation::BreadcrumbItemComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/practical/views/navigation/breadcrumb_item_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options: {}) ⇒ BreadcrumbItemComponent

Returns a new instance of BreadcrumbItemComponent.



7
8
9
# File 'app/components/practical/views/navigation/breadcrumb_item_component.rb', line 7

def initialize(options: {})
  self.options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'app/components/practical/views/navigation/breadcrumb_item_component.rb', line 5

def options
  @options
end

Instance Method Details

#callObject



12
13
14
15
16
17
18
19
# File 'app/components/practical/views/navigation/breadcrumb_item_component.rb', line 12

def call
  tag.wa_breadcrumb_item(**mix({}, options)) {
    safe_join([
      (prefix if prefix?),
      content
    ])
  }
end