(Not documented)
# File vendor/plugins/ubiquo_core/lib/ubiquo/navigation_tabs/navigator_tabs.rb, line 6
6: def initialize(options = {})
7: # Get default options for each Tab
8: if options[:tab_options] && options[:tab_options].kind_of?(Hash)
9: @tab_options = options[:tab_options]
10: else
11: @tab_options = {}
12: end
13: options.delete(:tab_options)
14:
15: # Merge html options with other configuration options
16: options.merge!(options.delete(:html)||{})
17:
18: # Options for <ul>
19: @html_options = { :id => options[:id],
20: :class => options[:class] }
21:
22: # Tabs attribute will contain an array of Tab instances
23: @tabs = []
24:
25: @previous_code = "asdsadasd"
26: @next_code = "post"
27: end
Method to add a tab inside a navigator object
# File vendor/plugins/ubiquo_core/lib/ubiquo/navigation_tabs/navigator_tabs.rb, line 30
30: def add_tab(options = {}, &block)
31: id = @tab_options[:id] ? (@tab_options[:id].to_s + "_" + (@tabs.size + 1).to_s) : nil
32:
33: tab = Tab.new({ :id => id,
34: :class => @tab_options[:class]
35: }.merge(options))
36: @tabs << tab
37: block.call(tab)
38: tab
39: end
Disabled; run with $DEBUG to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.