Class: ROM::MapperRegistry

Inherits:
Registry
  • Object
show all
Defined in:
core/lib/rom/mapper_registry.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ROM::Registry

Instance Attribute Details

#compilerMapperCompiler (readonly)

Returns A mapper compiler instance.

Returns:

  • (MapperCompiler)

    A mapper compiler instance



17
18
19
# File 'core/lib/rom/mapper_registry.rb', line 17

option :compiler, default: lambda {
  MapperCompiler.new(EMPTY_HASH, cache: cache)
}

Instance Method Details

#[](*args) ⇒ Object

See Also:

  • Registry


23
24
25
26
27
28
29
# File 'core/lib/rom/mapper_registry.rb', line 23

def [](*args)
  if args[0].is_a?(Symbol)
    super
  else
    cache.fetch_or_store(args.hash) { compiler.(*args) }
  end
end