Class: ROM::Relation::Wrap
Overview
Relation wrapping other relations
Instance Attribute Summary collapse
- #__memoized__ ⇒ Object included from Memoizable readonly private
Instance Method Summary collapse
-
#call(*args) ⇒ Loaded
Materialize a wrap.
-
#relation ⇒ Object
abstract
private
Return an adapter-specific relation representing a wrap.
-
#wrap(*args) ⇒ Wrap
Wrap more relations.
-
#wrap? ⇒ true
private
Return if this is a wrap relation.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ROM::Pipeline::Proxy
Instance Attribute Details
#__memoized__ ⇒ Object (readonly) Originally defined in module Memoizable
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.
Instance Method Details
#call(*args) ⇒ Loaded
Materialize a wrap
30 31 32 33 34 35 36 |
# File 'core/lib/rom/relation/wrap.rb', line 30 def call(*args) if auto_map? Loaded.new(self, mapper.(relation.with(auto_map: false, auto_struct: false))) else Loaded.new(self, relation.(*args)) end end |
#relation ⇒ 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.
Return an adapter-specific relation representing a wrap
43 44 45 |
# File 'core/lib/rom/relation/wrap.rb', line 43 def relation raise NotImplementedError end |
#wrap(*args) ⇒ Wrap
Wrap more relations
19 20 21 |
# File 'core/lib/rom/relation/wrap.rb', line 19 def wrap(*args) self.class.new(root, nodes + root.wrap(*args).nodes) end |
#wrap? ⇒ true
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.
Return if this is a wrap relation
52 53 54 |
# File 'core/lib/rom/relation/wrap.rb', line 52 def wrap? true end |