Class: HandyToolbox::MenuLoader
- Defined in:
- lib/handy_toolbox/menu_loader.rb
Constant Summary collapse
- NOT_LOADED_YET_ICON =
' % '
Constants inherited from Menu
Instance Attribute Summary
Attributes inherited from Menu
#children, #id, #parent, #tools
Instance Method Summary collapse
- #icon ⇒ Object
-
#initialize(parent, group, loader) ⇒ MenuLoader
constructor
A new instance of MenuLoader.
- #on_load ⇒ Object
Methods inherited from Menu
#menu, #menu_loader, #plugin, #to_s, #tool
Constructor Details
#initialize(parent, group, loader) ⇒ MenuLoader
Returns a new instance of MenuLoader.
6 7 8 9 10 |
# File 'lib/handy_toolbox/menu_loader.rb', line 6 def initialize(parent, group, loader) super(parent, group) @loader = loader @loaded = false end |
Instance Method Details
#icon ⇒ Object
19 20 21 |
# File 'lib/handy_toolbox/menu_loader.rb', line 19 def icon @loaded ? super : NOT_LOADED_YET_ICON end |
#on_load ⇒ Object
12 13 14 15 16 17 |
# File 'lib/handy_toolbox/menu_loader.rb', line 12 def on_load if !@loaded @loader.on_load(self) @loaded = true end end |