<commit_before>module EasyAPP
  class BaseNavigation < SimpleDelegator

    attr_reader :prefix
    attr_reader :opts


    def initialize(view, opts = {})
      super(view)
      @prefix = opts.delete(:prefix) { nil }
    end


    class << self

      def sidebar_menu_top_content=(content)
        @top_content = content
      end

      def sidebar_menu_top_content
        @top_content ||= []
      end

      def sidebar_menu_bottom_content=(content)
        @bottom_content = content
      end

      def sidebar_menu_bottom_content
        @bottom_content ||= []
      end

      def sidebar_menu_top_title=(title)
        @top_title = title
      end

      def sidebar_menu_top_title
        @top_title ||= I18n.t('layouts.sidebar.top.title')
      end

      def sidebar_menu_bottom_title=(title)
        @bottom_title = title
      end

      def sidebar_menu_bottom_title
        @bottom_title ||= I18n.t('layouts.sidebar.bottom.title')
      end

    end


    def render(opts = {})
      return unless renderable?
      @opts = opts
      render_navigation(navmenu_options, &nav_menu)
    end


    def with_prefix(id)
      return id if prefix.nil?
      "#{prefix}_#{id}".to_sym
    end


    def sidebar_menu(&block)
      proc do |menu|
        menu.dom_class = get_current_theme.navmenu_class
        yield menu
      end
    end


    def topbar_right_menu(&block)
      proc do |menu|
        menu.dom_class = get_current_theme.navbar_top_right_class
        yield menu
      end
    end


    def topbar_left_menu(&block)
      proc do |menu|
        menu.dom_class = get_current_theme.navbar_top_left_class
        yield menu
      end
    end


    def renderable?
      true
    end


    def navmenu_options
      { renderer: :bootstrap3, expand_all: true, skip_if_empty: true }
    end

<commit_msg>Add method to retrieve custom dropdown css<commit_after>module EasyAPP
  class BaseNavigation < SimpleDelegator

    attr_reader :prefix
    attr_reader :opts


    def initialize(view, opts = {})
      super(view)
      @prefix = opts.delete(:prefix) { nil }
    end


    class << self

      def sidebar_menu_top_content=(content)
        @top_content = content
      end

      def sidebar_menu_top_content
        @top_content ||= []
      end

      def sidebar_menu_bottom_content=(content)
        @bottom_content = content
      end

      def sidebar_menu_bottom_content
        @bottom_content ||= []
      end

      def sidebar_menu_top_title=(title)
        @top_title = title
      end

      def sidebar_menu_top_title
        @top_title ||= I18n.t('layouts.sidebar.top.title')
      end

      def sidebar_menu_bottom_title=(title)
        @bottom_title = title
      end

      def sidebar_menu_bottom_title
        @bottom_title ||= I18n.t('layouts.sidebar.bottom.title')
      end

    end


    def render(opts = {})
      return unless renderable?
      @opts = opts
      render_navigation(navmenu_options, &nav_menu)
    end


    def with_prefix(id)
      return id if prefix.nil?
      "#{prefix}_#{id}".to_sym
    end


    def sidebar_menu(&block)
      proc do |menu|
        menu.dom_class = get_current_theme.navmenu_class
        yield menu
      end
    end


    def topbar_right_menu(&block)
      proc do |menu|
        menu.dom_class = get_current_theme.navbar_top_right_class
        yield menu
      end
    end


    def topbar_left_menu(&block)
      proc do |menu|
        menu.dom_class = get_current_theme.navbar_top_left_class
        yield menu
      end
    end


    def dropdown_menu_class
      get_current_theme.dropdown_menu_class
    end


    def renderable?
      true
    end


    def navmenu_options
      { renderer: :bootstrap3, expand_all: true, skip_if_empty: true }
    end


{'fraction_non_alphanumeric': 0.07357237715803452, 'fraction_numerical': 0.0026560424966799467, 'mean_word_length': 2.2078364565587734, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '508559', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1145, 'n_words': 254}