Class: Lolita::Configuration::Factory::Tab
- Defined in:
- lib/lolita/configuration/factory/tab.rb
Class Method Summary collapse
Class Method Details
.create(dbi, *args, &block) ⇒ Object Also known as: add
7 8 9 10 |
# File 'lib/lolita/configuration/factory/tab.rb', line 7 def create(dbi,*args, &block) type = args && args[0].is_a?(Symbol) ? args[0] : :default field_class(type).new(dbi,*args,&block) end |
.field_class(name) ⇒ Object
15 16 17 |
# File 'lib/lolita/configuration/factory/tab.rb', line 15 def field_class(name) ("Lolita::Configuration::Tab::"+name.to_s.camelize).constantize end |