Module: Geri::Config

Includes:
ActiveSupport::Configurable
Defined in:
lib/geri/config.rb,
lib/geri/config/menu_item.rb

Defined Under Namespace

Classes: MenuItem

Class Method Summary collapse

Class Method Details

.configure(&block) ⇒ Object

configure override



21
22
23
24
25
# File 'lib/geri/config.rb', line 21

def self.configure(&block)
  begin
    yield self
  end
end

.register_menu_item(title, path_or_options = nil, options = {}) {|item| ... } ⇒ Object

Yields:

  • (item)


14
15
16
17
18
# File 'lib/geri/config.rb', line 14

def self.register_menu_item(title, path_or_options=nil, options={})
  self.menu_items << item = MenuItem.new(title, path_or_options, options)
  yield item if block_given?
  self.menu_items.sort! { |a,b| a.priority <=> b.priority }
end