Class: Cmtool::Menu::Group
- Inherits:
-
ElementBase
- Object
- ElementBase
- Cmtool::Menu::Group
- Defined in:
- lib/cmtool/menu.rb
Overview
A group element, works as a new kind of menu, but then within another one
Instance Method Summary collapse
- #controller_names ⇒ Object
- #group? ⇒ Boolean
-
#initialize(options = {}, &block) ⇒ Group
constructor
A new instance of Group.
- #title ⇒ Object
Methods inherited from ElementBase
#controller_name, #engine_link?, #method_missing, #options, #resource_link?
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cmtool::Menu::ElementBase
Instance Method Details
#controller_names ⇒ Object
84 85 86 |
# File 'lib/cmtool/menu.rb', line 84 def controller_names resource_links.map(&:controller_name) end |
#group? ⇒ Boolean
87 88 89 |
# File 'lib/cmtool/menu.rb', line 87 def group? true end |
#title ⇒ Object
80 81 82 |
# File 'lib/cmtool/menu.rb', line 80 def title @register.title.respond_to?(:call) ? @register.title.call : @register.title end |