Sha256: bf72ccdbcb61d6f828863d5af19442d349f66d27f93226992dc627445b71572f

Contents?: true

Size: 1.11 KB

Versions: 9

Compression:

Stored size: 1.11 KB

Contents

$: << File.dirname(__FILE__) unless $:.include?(File.dirname(__FILE__))
require 'haml'
require 'lolita'

module Lolita
  module Menu
    autoload :Configuration, "lolita-menu/configuration"
    module Autocomplete
      autoload :LinkSet, "lolita-menu/autocomplete/link_set"
      autoload :FileBuilder, "lolita-menu/autocomplete/file_builder"
      autoload :Collector, "lolita-menu/autocomplete/collector"

      def self.generate_urls
        file = Lolita::Menu::Autocomplete::FileBuilder.input_file
        instance_eval(File.read(file),file)
      end
    end
    # took this from sitemap_generator
    Urls = (Class.new do
      def method_missing(*args, &block)
        (@link_set ||= reset!).send(*args, &block)
      end

      # Use a new LinkSet instance
      def reset!
        @link_set = Autocomplete::LinkSet.new
      end
    end).new
  end
end

module LolitaMenuConfiguration
  def menu
    @menu ||= Lolita::Menu::Configuration.new
  end
end

Lolita.configuration.extend(LolitaMenuConfiguration)


require 'lolita-menu/module'
require 'lolita-menu/nested_tree'
require 'lolita-menu/rails'
#require 'lolita-menu/railtie'

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lolita-menu-0.4.2 lib/lolita-menu.rb
lolita-menu-0.4.1 lib/lolita-menu.rb
lolita-menu-0.4.0 lib/lolita-menu.rb
lolita-menu-0.3.6 lib/lolita-menu.rb
lolita-menu-0.3.5 lib/lolita-menu.rb
lolita-menu-0.3.4 lib/lolita-menu.rb
lolita-menu-0.3.2 lib/lolita-menu.rb
lolita-menu-0.3.1 lib/lolita-menu.rb
lolita-menu-0.3.0 lib/lolita-menu.rb