Class: Sidebars::NilMenuItem

Inherits:
MenuItem show all
Extended by:
Gitlab::Utils::Override
Defined in:
lib/sidebars/nil_menu_item.rb

Instance Attribute Summary

Attributes inherited from MenuItem

#active_routes, #container_html_options, #hint_html_options, #item_id, #link, #sprite_icon, #sprite_icon_html_options, #title

Instance Method Summary collapse

Methods included from Gitlab::Utils::Override

extended, extensions, included, method_added, override, prepended, queue_verification, verify!

Methods inherited from MenuItem

#nav_link_html_options, #show_hint?

Methods included from Concerns::LinkWithHtmlOptions

#link_html_options

Constructor Details

#initialize(item_id:) ⇒ NilMenuItem

Returns a new instance of NilMenuItem.


7
8
9
# File 'lib/sidebars/nil_menu_item.rb', line 7

def initialize(item_id:)
  super(item_id: item_id, title: nil, link: nil, active_routes: {})
end

Instance Method Details

#render?Boolean

Returns:

  • (Boolean)

12
13
14
# File 'lib/sidebars/nil_menu_item.rb', line 12

def render?
  false
end