Method: ROM::Relation::ClassInterface#mapper_registry
- Defined in:
- lib/rom/relation/class_interface.rb
#mapper_registry(opts = EMPTY_HASH) ⇒ MapperRegistry
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Build default mapper registry
258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/rom/relation/class_interface.rb', line 258 def mapper_registry(opts = EMPTY_HASH) adapter_ns = ROM.adapters[adapter] compiler = if adapter_ns && adapter_ns.const_defined?(:MapperCompiler) adapter_ns.const_get(:MapperCompiler) else MapperCompiler end MapperRegistry.new({}, { compiler: compiler.new(opts) }.merge(opts)) end |