trabajo-afectivo/lib/application_lib.rb

18 lines
326 B
Ruby
Raw Normal View History

class ApplicationLib
def self.load_adapter_by_setting(setting)
adapter = Setting.get( setting )
return if !adapter
# load backend
self.load_adapter(adapter)
end
def self.load_adapter(adapter)
# load adapter
backend = Object.const_get(adapter)
# return backend
return backend
end
end