module AbAdmin module Menu class Group < BaseGroup def initialize(title, options, &block) @menu_tree = [] @title = title.is_a?(Symbol) ? I18n.t(title, scope: [:admin, :navigation]) : title @options = options instance_eval &block if block_given? end def render(template) return if @options[:if] && !call_method_or_proc_on(template, @options[:if]) return if @options[:unless] && call_method_or_proc_on(template, @options[:unless]) <<-HTML.html_safe