class RemiLib::DependencyGraph::Node(N, T)
- RemiLib::DependencyGraph::Node(N, T)
- Reference
- Object
Overview
A single item within a DependencyGraph
. This wraps a single data item
of type T
, associating it with a particular name of type N
.
When resolving dependencies, for each item of type T
, a procedure of
type Proc(N, T, Nil)
will be called.
Defined in:
remilib/dependencygraph.crConstructors
-
.new(name : N, data : T)
Creates a new
Node
.
Instance Method Summary
-
#<<(dep : Node(N, T))
Adds a new dependency for this node.
-
#data : T
The data associated with this dependency.
-
#deps : Array(Node(N, T))
The other things that this node depends on.
-
#dryRun(resolved : Array(Node(N, T)), seen : Array(Node(N, T))) : Nil
Resolves the dependencies for this node.
-
#name : N
The name associated with this dependency.
-
#resolve(fn : Proc(N, T, Nil), resolved : Array(Node(N, T)), seen : Array(Node(N, T))) : Nil
Resolves the dependencies for this node, then runs
fn
.
Constructor Detail
Instance Method Detail
Resolves the dependencies for this node. Unlike #resolve
, this
doesn't run anything, and instead is used simply to determine the order
of dependency resolution.