Class: CanTango::Config::Adapters
Instance Attribute Summary
#default, #registered
Instance Method Summary
collapse
#[], #clean!, #default!, #register, #registered?, #reset!, #types, #types=, #valid?
Instance Method Details
#adapter(name) ⇒ Object
6
7
8
9
|
# File 'lib/cantango/config/adapters.rb', line 6
def adapter name
raise "Unknown adapter #{name}" if !available.include? name.to_sym
require "cantango/adapter/#{name}"
end
|
#available ⇒ Object
15
16
17
|
# File 'lib/cantango/config/adapters.rb', line 15
def available
[:moneta, :compiler]
end
|
#use(*names) ⇒ Object
11
12
13
|
# File 'lib/cantango/config/adapters.rb', line 11
def use *names
names.each {|name| adapter name }
end
|