Class: ROM::Commands::Graph Private
- Inherits:
-
Object
- Object
- ROM::Commands::Graph
- Extended by:
- ClassInterface, Initializer
- Includes:
- Pipeline, Pipeline::Proxy
- Defined in:
- lib/rom/commands/graph.rb,
lib/rom/commands/graph/class_interface.rb,
lib/rom/commands/graph/input_evaluator.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Command graph
Defined Under Namespace
Modules: ClassInterface Classes: InputEvaluator
Instance Method Summary collapse
-
#call(*args) ⇒ Array
Calls root and all nodes with the result from root.
- #graph? ⇒ Boolean private
Methods included from Initializer
Methods included from ClassInterface
Methods included from Pipeline::Proxy
Methods included from Pipeline
Methods included from Pipeline::Operator
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ROM::Pipeline::Proxy
Instance Method Details
#call(*args) ⇒ Array
Calls root and all nodes with the result from root
Graph results are mappable through ‘combine` operation in mapper DSL
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/rom/commands/graph.rb', line 50 def call(*args) left = root.call(*args) right = nodes.map { |node| response = if node.lazy? node.call(args.first, left) else node.call(left) end if node.one? && !node.graph? [response] else response end } if one? [[left], right] else [left, right] end end |
#graph? ⇒ Boolean
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.
76 77 78 |
# File 'lib/rom/commands/graph.rb', line 76 def graph? true end |