Class: ROM::Memory::Schema
- Inherits:
-
Schema
- Object
- Schema
- ROM::Memory::Schema
- Defined in:
- core/lib/rom/memory/schema.rb
Overview
Specialized schema for memory adapter
Instance Method Summary collapse
- #call(relation) ⇒ Object
-
#finalize_associations!(relations:) ⇒ Object
private
Internal hook used during setup process.
Instance Method Details
#call(relation) ⇒ Object
14 15 16 |
# File 'core/lib/rom/memory/schema.rb', line 14 def call(relation) relation.new(relation.dataset.project(*map(&:name)), schema: self) end |
#finalize_associations!(relations:) ⇒ Object
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.
Internal hook used during setup process
23 24 25 26 27 28 29 |
# File 'core/lib/rom/memory/schema.rb', line 23 def finalize_associations!(relations:) super do associations.map do |definition| Memory::Associations.const_get(definition.type).new(definition, relations) end end end |