Class: Build::DependencyNode

Inherits:
Graph::Node
  • Object
show all
Defined in:
lib/build/dependency_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chain, dependency, environment, arguments) ⇒ DependencyNode

Returns a new instance of DependencyNode.



27
28
29
30
31
32
33
34
35
# File 'lib/build/dependency_node.rb', line 27

def initialize(chain, dependency, environment, arguments)
	@chain = chain
	@dependency = dependency
	@environment = environment
	@arguments = arguments
	
	# Wait here, for all dependent targets, to be done:
	super(Files::List::NONE, :inherit)
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



40
41
42
# File 'lib/build/dependency_node.rb', line 40

def arguments
  @arguments
end

#chainObject (readonly)

Returns the value of attribute chain.



37
38
39
# File 'lib/build/dependency_node.rb', line 37

def chain
  @chain
end

#dependencyObject (readonly)

Returns the value of attribute dependency.



38
39
40
# File 'lib/build/dependency_node.rb', line 38

def dependency
  @dependency
end

#environmentObject (readonly)

Returns the value of attribute environment.



39
40
41
# File 'lib/build/dependency_node.rb', line 39

def environment
  @environment
end

Instance Method Details

#==(other) ⇒ Object



42
43
44
45
46
47
48
# File 'lib/build/dependency_node.rb', line 42

def == other
	super and
		@chain == other.chain and
		@dependency == other.dependency and
		@environment == other.environment and
		@arguments == other.arguments
end

#hashObject



50
51
52
# File 'lib/build/dependency_node.rb', line 50

def hash
	super ^ @chain.hash ^ @dependency.hash ^ @environment.hash ^ @arguments.hash
end

#nameObject



58
59
60
# File 'lib/build/dependency_node.rb', line 58

def name
	@dependency.name
end

#provision_node_for(provision) ⇒ Object



70
71
72
# File 'lib/build/dependency_node.rb', line 70

def provision_node_for(provision)
	ProvisionNode.new(@chain, provision, @environment, @arguments)
end

#provisionsObject



62
63
64
# File 'lib/build/dependency_node.rb', line 62

def provisions
	@chain.resolved[@dependency]
end

#public?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/build/dependency_node.rb', line 66

def public?
	@dependency.public?
end

#task_class(parent_task) ⇒ Object



54
55
56
# File 'lib/build/dependency_node.rb', line 54

def task_class(parent_task)
	DependencyTask
end