Class: CanTango::Configuration::Adapters
- Inherits:
-
Registry
- Object
- Registry
- CanTango::Configuration::Adapters
show all
- Includes:
- Singleton
- Defined in:
- lib/cantango/configuration/adapters.rb
Instance Attribute Summary
Attributes inherited from Registry
#default, #registered
Instance Method Summary
collapse
Methods inherited from Registry
#[], #clean!, #default!, #register, #registered?, #types, #types=
Instance Method Details
#adapter(name) ⇒ Object
7
8
9
10
|
# File 'lib/cantango/configuration/adapters.rb', line 7
def adapter name
raise "Unknown adapter #{name}" if !available_adapters.include? name.to_sym
require "cantango/adapter/#{name}"
end
|
#available_adapters ⇒ Object
16
17
18
|
# File 'lib/cantango/configuration/adapters.rb', line 16
def available_adapters
[:moneta, :compiler]
end
|
#use(*names) ⇒ Object
12
13
14
|
# File 'lib/cantango/configuration/adapters.rb', line 12
def use *names
names.each {|name| adapter name }
end
|