Module: OsCtld::Container::Adaptor
- Defined in:
- lib/osctld/container/adaptor.rb
Overview
Adapt container config to make it compatible with the current system
Defined Under Namespace
Class Method Summary collapse
-
.adapt(ct, config) ⇒ Hash
Adapted config.
- .register(name, klass) ⇒ Object
Class Method Details
.adapt(ct, config) ⇒ Hash
Returns adapted config.
14 15 16 17 18 19 20 |
# File 'lib/osctld/container/adaptor.rb', line 14 def self.adapt(ct, config) (@adaptors || {}).each_value do |klass| config = klass.new(ct, config).adapt end config end |
.register(name, klass) ⇒ Object
6 7 8 9 |
# File 'lib/osctld/container/adaptor.rb', line 6 def self.register(name, klass) @adaptors ||= {} @adaptors[name] = klass end |