Class: ROM::MapperRegistry
- Inherits:
-
Registry
- Object
- Registry
- ROM::MapperRegistry
- Defined in:
- core/lib/rom/mapper_registry.rb
Instance Attribute Summary collapse
-
#compiler ⇒ MapperCompiler
readonly
A mapper compiler instance.
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
#compiler ⇒ MapperCompiler (readonly)
Returns 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
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 |