class Formic::Tab

Attributes

title[R]

Public Instance Methods

_initialize(title='', options={}) click to toggle source
Calls superclass method Formic::Base#_initialize
# File lib/formic/tab.rb, line 7
def _initialize title='', options={}, &block
  super options, &block
  @title = title
  self.tab_panel.tabs.push self
  self.options[:id] ||= "#{title.downcase.gsub(' ', '_')}_tab"
  return self
end
tab_panel() click to toggle source
# File lib/formic/tab.rb, line 15
def tab_panel
  self.formics.each do |element|
    return element if element.instance_of? Formic::TabPanel
  end

  return nil
end