Module: ActiveMenu

Defined in:
lib/active_menu.rb,
lib/active_menu/version.rb

Defined Under Namespace

Classes: Menu, Node, Registry

Constant Summary collapse

VERSION =
"0.8.0"

Class Method Summary collapse

Class Method Details

.create(id, options = {}, &block) ⇒ Object



12
13
14
# File 'lib/active_menu.rb', line 12

def self.create(id, options={}, &block)
  self.registry.create(id, options, &block)
end

.exists?(id) ⇒ Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/active_menu.rb', line 24

def self.exists?(id)
  self.registry.exists?(id)
end

.get(id, &block) ⇒ Object



20
21
22
# File 'lib/active_menu.rb', line 20

def self.get(id, &block)
  self.registry.get(id, &block)
end

.registryObject



8
9
10
# File 'lib/active_menu.rb', line 8

def self.registry
  ActiveMenu::Registry.instance
end

.resetObject



16
17
18
# File 'lib/active_menu.rb', line 16

def self.reset
  self.registry.reset
end