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, #method_missing, #options
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
74 75 76 |
# File 'lib/cmtool/menu.rb', line 74 def controller_names resource_links.map(&:controller_name) end |
#group? ⇒ Boolean
77 78 79 |
# File 'lib/cmtool/menu.rb', line 77 def group? true end |
#title ⇒ Object
70 71 72 |
# File 'lib/cmtool/menu.rb', line 70 def title @register.title.respond_to?(:call) ? @register.title.call : @register.title end |