Module: Symphonia::MenuManager

Defined in:
lib/symphonia/menu_manager.rb

Constant Summary collapse

@@mapper =
{}

Class Method Summary collapse

Class Method Details

.clear(menu_name) ⇒ Object



18
19
20
# File 'lib/symphonia/menu_manager.rb', line 18

def clear(menu_name)
  !mapper.delete(menu_name.to_sym).nil?
end

.map(menu_name) ⇒ Object



11
12
13
14
15
16
# File 'lib/symphonia/menu_manager.rb', line 11

def map(menu_name)
  mapper[menu_name] ||= {}
  if block_given?
    yield mapper[menu_name]
  end
end


6
7
8
# File 'lib/symphonia/menu_manager.rb', line 6

def self.menu(name)
  return mapper[name.to_sym] || {}
end