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
-
.configure(&block) ⇒ Object
configure override.
- .register_menu_item(title, path_or_options = nil, options = {}) {|item| ... } ⇒ Object
Class Method Details
.configure(&block) ⇒ Object
configure override
22 23 24 25 26 |
# File 'lib/geri/config.rb', line 22 def self.configure(&block) begin yield self end end |
.register_menu_item(title, path_or_options = nil, options = {}) {|item| ... } ⇒ Object
15 16 17 18 19 |
# File 'lib/geri/config.rb', line 15 def self.(title, =nil, ={}) self. << item = MenuItem.new(title, , ) yield item if block_given? self..sort! { |a,b| a.priority <=> b.priority } end |