<commit_before>module Menumatic
  module Helpers
    module NavigationHelper

      def menumatic(navigation_id = :application, options = {})
        options[:level] ||= nil # single level to render, overrides any other level settings
        options[:levels] ||= [options[:level]].delete_if{ |l| l.blank? }

        options[:group] ||= nil
        options[:groups] ||= [options[:groups]].delete_if{ |g| g.blank? }

        options[:class] ||= ""
        options[:class] += "navigation #{navigation_id.to_s}"

        navigation = Menumatic::Navigation::Base.load_navigation(navigation_id.to_sym)
        navigation.root.render(request, options)
      end

      def sitemap(document, navigation_id = "application", options = {})
        navigation = load_navigation(navigation_id)
        navigation.root.render_sitemap(document, request, options)
      end

      # refactor this into a class method on Menumatic::Navigation::Base

      #def navigation_group(navigation_id, group_id, options = {})
      #  options = options.merge({:group => group_id})
      #  navigation(navigation_id, options)
      #end
    end
  end
end<commit_msg>Removed redundant function<commit_after>module Menumatic
  module Helpers
    module NavigationHelper
      def menumatic(navigation_id = :application, options = {})
        options[:level] ||= nil # single level to render, overrides any other level settings
        options[:levels] ||= [options[:level]].delete_if{ |l| l.blank? }

        options[:group] ||= nil
        options[:groups] ||= [options[:groups]].delete_if{ |g| g.blank? }

        options[:class] ||= ""
        options[:class] += "navigation #{navigation_id.to_s}"

        navigation = Menumatic::Navigation::Base.load_navigation(navigation_id.to_sym)
        navigation.root.render(request, options)
      end

      def sitemap(document, navigation_id = "application", options = {})
        navigation = load_navigation(navigation_id)
        navigation.root.render_sitemap(document, request, options)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.12450980392156863, 'fraction_numerical': 0.0, 'mean_word_length': 3.361111111111111, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2878206', 'n_tokens_mistral': 585, 'n_tokens_neox': 565, 'n_words': 127}