Method: Nav::Item::Component#initialize

Defined in:
app/components/lookbook/nav/item/component.rb

#initialize(item, nav_id:, depth: 1, collapse_singles: false, **html_attrs) ⇒ Component

Returns a new instance of Component.



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'app/components/lookbook/nav/item/component.rb', line 15

def initialize(
  item,
  nav_id:,
  depth: 1,
  collapse_singles: false,
  **html_attrs
)
  @nav_id = nav_id
  @item = item
  @depth = depth
  @collapse_singles = collapse_singles
  super(**html_attrs)
end