Module: ROM::Pipeline Private

Includes:
Operator
Included in:
Commands::Graph, Relation, Relation::Curried, Relation::Graph
Defined in:
core/lib/rom/pipeline.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Data pipeline common interface

Defined Under Namespace

Modules: Operator, Proxy Classes: Composite

Instance Method Summary collapse

Instance Method Details

#>>(other) ⇒ Relation::Composite Originally defined in module Operator

Compose two relation with a left-to-right composition

Examples:

users.by_name('Jane') >> tasks.for_users

Parameters:

  • other (Relation)

    The right relation

Returns:

#map_with(*names) ⇒ Relation::Composite

Send data through specified mappers

Returns:



41
42
43
44
# File 'core/lib/rom/pipeline.rb', line 41

def map_with(*names)
  [self, *names.map { |name| mappers[name] }]
    .reduce { |a, e| composite_class.new(a, e) }
end