Module: Lolita::Configuration::Factory
Instance Method Summary collapse
Instance Method Details
#add(dbi, *args, &block) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/lolita/configuration/factory.rb', line 10 def add(dbi,*args,&block) @create_temp_object=true begin temp_object=self.const_get(:Base).new(dbi,*args,&block) rescue Exception => e raise e ensure @create_temp_object=false end factory(temp_object.type).new(dbi,*args,&block) end |
#temp_object? ⇒ Boolean
5 6 7 8 |
# File 'lib/lolita/configuration/factory.rb', line 5 def temp_object? @create_temp_object||=false @create_temp_object end |