Module: ROM::Registries::Nestable
Instance Method Summary collapse
- #fetch(key, &block) ⇒ Object (also: #[])
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 |