Class: Ramenu::Configuration
- Inherits:
-
Object
- Object
- Ramenu::Configuration
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/ramenu/config.rb
Overview
need a Class for 3.0
Instance Method Summary collapse
-
#add_menu(name, path = nil, options = {}, &block) ⇒ Object
create a new static menus in the configuration.
-
#definer(name = nil, options = {}) {|rd| ... } ⇒ Object
common.
-
#set_flag(name, value = nil, options = {}) ⇒ Object
create a new static flag in the configuration.
Instance Method Details
#add_menu(name, path = nil, options = {}, &block) ⇒ Object
create a new static menus in the configuration
39 40 41 42 |
# File 'lib/ramenu/config.rb', line 39 def (name, path = nil, = {}, &block) = Ramenu.([:menu]) Ramenu.(, name, path, , &block) end |
#definer(name = nil, options = {}) {|rd| ... } ⇒ Object
common
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ramenu/config.rb', line 21 def definer(name = nil, = {}, &block) # menus = Ramenu.(name) # flags flags = Ramenu.static_flags(name) # use a definer to allow block rd = RamenuDefiner.new(, flags, ) yield rd if block_given? end |
#set_flag(name, value = nil, options = {}) ⇒ Object
create a new static flag in the configuration
33 34 35 36 |
# File 'lib/ramenu/config.rb', line 33 def set_flag(name, value = nil, = {}) flags = Ramenu.static_flags([:flagset]) Ramenu.set_flag_in(flags, name, value, ) end |