class Barista::Graph

Overview

A simple Directed Acyclic Graph

Defined in:

barista/graph.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(nodes : Array(String) = [] of String, vertices : Hash(String, Barista::Graph::Vertex) = {} of String => Vertex) #

[View source]

Instance Method Detail

def add(node : String) #

Adds a task name to the Graph


[View source]
def add(node : Symbol) #

[View source]
def add_edge(from : String, to : String) : Nil #

Connects 2 tasks in the Graph with an edge


[View source]
def add_edge(from : Symbol, to : Symbol) #

[View source]
def filter(names, result = names.dup) #

Fetch a flat list of dependencies given an array of task names


[View source]
def nodes : Array(String) #

[View source]
def vertices : Hash(String, Barista::Graph::Vertex) #

[View source]