Class: Merrymenu::Menu

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/merrymenu/builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMenu

Returns a new instance of Menu.



22
23
24
# File 'lib/merrymenu/builder.rb', line 22

def initialize
  self.use_I18n_translation = false
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#tabsObject

Returns the value of attribute tabs.



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

def tabs
  @tabs
end

#use_I18n_translationObject

Returns the value of attribute use_I18n_translation.



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

def use_I18n_translation
  @use_I18n_translation
end

Instance Method Details

#buildObject



33
34
35
# File 'lib/merrymenu/builder.rb', line 33

def build
  tabs
end

Yields:



26
27
28
29
30
31
# File 'lib/merrymenu/builder.rb', line 26

def menu(name="menu", options={})
  @name = name
  tabs = Tabs.new
  yield tabs
  @tabs = tabs.build
end