Class: Rake::Pipeline::Graph::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/rake-pipeline/graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, metadata = {}) ⇒ Node


53
54
55
56
57
58
# File 'lib/rake-pipeline/graph.rb', line 53

def initialize(name, ={})
  @name = name
  @parents = Set.new
  @children = Set.new
  @metadata = 
end

Instance Attribute Details

#childrenSet (readonly)


46
47
48
# File 'lib/rake-pipeline/graph.rb', line 46

def children
  @children
end

#metadataHash (readonly)


49
50
51
# File 'lib/rake-pipeline/graph.rb', line 49

def 
  @metadata
end

#nameString (readonly)


40
41
42
# File 'lib/rake-pipeline/graph.rb', line 40

def name
  @name
end

#parentsSet (readonly)


43
44
45
# File 'lib/rake-pipeline/graph.rb', line 43

def parents
  @parents
end

Instance Method Details

#==(other) ⇒ Object

A node is equal another node if it has the same name. This is because the Graph ensures that only one node with a given name can be created.


65
66
67
# File 'lib/rake-pipeline/graph.rb', line 65

def ==(other)
  @name == other.name
end