Skip to content

class Barista::Registry(T)
inherits Reference #

stores the list of tasks organized in a dependency graph

Constructors#

.new(tasks : Array(T) = [] of T)#

Methods#

#<<(task)#

add a task

#[](name : String) : T#

get a single task

#[]?(name : String) : T | Nil#

#dag#

get a directed acyclic graph from a task list

#invert#

returns a clone of this object with the dependency graph inverted

#reset#

#tasks#

#upstreams(task : String) : Array(T)#

#upstreams(task : T) : Array(T)#

get a flat list of upstream dependencies