Module: Engine2::MetaMenuSupport
- Included in:
- ConfirmMeta, LogoutFormMeta, MenuMeta, MetaFormSupport, MetaListSupport, MetaViewSupport
- Defined in:
- lib/engine2/meta.rb
Instance Method Summary collapse
Instance Method Details
#menu(menu_name, &blk) ⇒ Object
190 191 192 193 194 195 |
# File 'lib/engine2/meta.rb', line 190 def , &blk @menus ||= {} @menus[] ||= ActionMenuBuilder.new(:root) @menus[].instance_eval(&blk) if blk @menus[] end |
#menu?(menu_name) ⇒ Boolean
197 198 199 |
# File 'lib/engine2/meta.rb', line 197 def @menus && @menus[] end |
#post_process ⇒ Object
201 202 203 204 205 206 207 208 209 |
# File 'lib/engine2/meta.rb', line 201 def post_process super if @menus && !@menus.empty? @meta[:menus] = {} @menus.each_pair do |name, | @meta[:menus][name] = {entries: .to_a, properties: .properties} end end end |