Class: Formic::Tab
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Attributes inherited from Base
#content, #options, #page, #template
Instance Method Summary collapse
Methods inherited from Base
#add_class, default_template, #formics, #has_class?, #initialize, #merge_options, #method_missing, template, #to_s
Constructor Details
This class inherits a constructor from Formic::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Formic::Base
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'lib/formic/tab.rb', line 5 def title @title end |
Instance Method Details
#_initialize(title = '', options = {}, &block) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/formic/tab.rb', line 7 def _initialize title='', ={}, &block super , &block @title = title self.tab_panel.tabs.push self self.[:id] ||= "#{title.downcase.gsub(' ', '_')}_tab" return self end |