Class: ROM::Relation::Wrap

Inherits:
Graph
  • Object
show all
Defined in:
core/lib/rom/relation/wrap.rb

Overview

Relation wrapping other relations

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ROM::Pipeline::Proxy

Instance Method Details

#call(*args) ⇒ Loaded

Materialize a wrap

Returns:

See Also:



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

#wrap(*args) ⇒ Wrap

Wrap more relations

Returns:

See Also:



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