Class: ROM::Plugins::Relation::RegistryReader

Inherits:
Module
  • Object
show all
Defined in:
lib/rom/plugins/relation/registry_reader.rb

Overview

Allows relations to access all other relations through registry

For now this plugin is always enabled

Constant Summary collapse

EMPTY_REGISTRY =
EMPTY_HASH

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(relations:) ⇒ RegistryReader

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.

Returns a new instance of RegistryReader.



20
21
22
23
# File 'lib/rom/plugins/relation/registry_reader.rb', line 20

def initialize(relations:)
  @relations = relations
  define_readers!
end

Instance Attribute Details

#relationsObject (readonly)

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.



17
18
19
# File 'lib/rom/plugins/relation/registry_reader.rb', line 17

def relations
  @relations
end