Class: ROM::Commands::Graph Private
- Inherits:
-
Object
- Object
- ROM::Commands::Graph
- Extended by:
- ClassInterface, Initializer
- Includes:
- Pipeline, Pipeline::Proxy
- Defined in:
- core/lib/rom/commands/graph.rb,
core/lib/rom/commands/graph/class_interface.rb,
core/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
Class Method Summary collapse
-
.build(registry, options, path = EMPTY_ARRAY) ⇒ Graph
extended
from ClassInterface
private
Build a command graph recursively.
- .build_command(registry, spec, other, path) ⇒ Object extended from ClassInterface private
Instance Method Summary collapse
-
#>>(other) ⇒ Relation::Composite
included
from Pipeline::Operator
Compose two relation with a left-to-right composition.
-
#call(*args) ⇒ Array
Calls root and all nodes with the result from root.
- #graph? ⇒ Boolean private
-
#map_with(*names) ⇒ Relation::Composite
included
from Pipeline
Send data through specified mappers.
- #respond_to_missing?(name, include_private = false) ⇒ Boolean included from Pipeline::Proxy private
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ROM::Pipeline::Proxy
Class Method Details
.build(registry, options, path = EMPTY_ARRAY) ⇒ Graph Originally defined in module ClassInterface
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.
Build a command graph recursively
This is used by Container#command
when array with options is passed in
.build_command(registry, spec, other, path) ⇒ Object Originally defined in module ClassInterface
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
#>>(other) ⇒ Relation::Composite Originally defined in module Pipeline::Operator
Compose two relation with a left-to-right composition
#call(*args) ⇒ Array
Calls root and all nodes with the result from root
Graph results are mappable through combine
operation in mapper DSL
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'core/lib/rom/commands/graph.rb', line 52 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.
78 79 80 |
# File 'core/lib/rom/commands/graph.rb', line 78 def graph? true end |
#map_with(*names) ⇒ Relation::Composite Originally defined in module Pipeline
Send data through specified mappers
#respond_to_missing?(name, include_private = false) ⇒ Boolean Originally defined in module Pipeline::Proxy
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.