Class: MenuBar::MenuBarTrigger
- Inherits:
-
MenuBarItem
- Object
- AbstractContent
- AbstractItem
- MenuBarItem
- MenuBar::MenuBarTrigger
- Defined in:
- lib/menu_bar.rb
Constant Summary
Constants included from EasyMenu::Helpers
EasyMenu::Helpers::HTML_OPTIONS
Instance Attribute Summary
Attributes inherited from AbstractContent
Instance Method Summary collapse
-
#empty? ⇒ Boolean
If the menu has no content, don’t show the menu bar trigger.
-
#initialize(config, content, menu, options) ⇒ MenuBarTrigger
constructor
A new instance of MenuBarTrigger.
- #to_s ⇒ Object
Methods inherited from AbstractItem
#disable_when, #disabled, #selected
Methods inherited from AbstractContent
Methods included from EasyMenu::Helpers
#config_name, #css_class, #html_option_keys, #merge_class, #wrap_content, #wrapper_element
Constructor Details
#initialize(config, content, menu, options) ⇒ MenuBarTrigger
Returns a new instance of MenuBarTrigger.
258 259 260 261 |
# File 'lib/menu_bar.rb', line 258 def initialize(config, content, , ) @menu = super(config, content, ) end |
Instance Method Details
#empty? ⇒ Boolean
If the menu has no content, don’t show the menu bar trigger
264 265 266 |
# File 'lib/menu_bar.rb', line 264 def empty? @menu.empty? end |
#to_s ⇒ Object
268 269 270 |
# File 'lib/menu_bar.rb', line 268 def to_s super + @menu.to_s end |