Sha256: 31a1a09c94afb9aaa69170e7b35b5369f5e4056e05907fe2d7a83364889d35cd
Contents?: true
Size: 414 Bytes
Versions: 29
Compression:
Stored size: 414 Bytes
Contents
module Symphonia module MenuManager @@mapper = {} mattr_accessor :mapper def self.menu(name) return mapper[name.to_sym] || {} end class << self def map(menu_name) mapper[menu_name] ||= {} if block_given? yield mapper[menu_name] end end def clear(menu_name) !mapper.delete(menu_name.to_sym).nil? end end end end
Version data entries
29 entries across 29 versions & 1 rubygems