Method: MenuBar#initialize
- Defined in:
- lib/menu_bar.rb
#initialize(template, options = {}) {|_self| ... } ⇒ MenuBar
Returns a new instance of MenuBar.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/menu_bar.rb', line 11 def initialize(template, = {}) @template = template @options = .reverse_merge(:theme => config[:default_theme_class], :remove_dangling_separators => true) config.merge! [:config] if [:config] # Allow per menu overriding of configuration config[:template] = @template @content = [] @groups = [] # Subset of content that allows user to perform simpler non-sequential insertion into a particular group yield self if block_given? end |