Module: Lutaml::Store::Adapter
- Defined in:
- lib/lutaml/store/adapter.rb,
lib/lutaml/store/adapter/base.rb,
lib/lutaml/store/adapter/memory.rb,
lib/lutaml/store/adapter/sqlite.rb,
lib/lutaml/store/adapter/filesystem.rb
Defined Under Namespace
Classes: Base, FileSystem, Memory, Sqlite
Class Method Summary
collapse
Class Method Details
.register(type, adapter_class) ⇒ Object
24
25
26
|
# File 'lib/lutaml/store/adapter.rb', line 24
def self.register(type, adapter_class)
@registry[type.to_sym] = adapter_class.name
end
|
.resolve(type, options = {}) ⇒ Object
17
18
19
20
21
22
|
# File 'lib/lutaml/store/adapter.rb', line 17
def self.resolve(type, options = {})
entry = @registry[type.to_sym]
raise ConfigurationError, "Unknown adapter type: #{type}" unless entry
const_get(entry).new(options)
end
|