Module: ROM::Registries::Nestable

Included in:
Commands, Datasets, Mappers, Schemas, Views
Defined in:
lib/rom/registries/nestable.rb

Instance Method Summary collapse

Instance Method Details

#fetch(key, &block) ⇒ Object Also known as: []



7
8
9
10
11
12
13
14
15
# File 'lib/rom/registries/nestable.rb', line 7

def fetch(key, &block)
  if relation_namespace?(key)
    super(namespace, &block)
  elsif relation_scope_key?(key)
    scoped(key)
  else
    super(key, &block)
  end
end