Class: Build::ProvisionNode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chain, provision, environment, arguments) ⇒ ProvisionNode

Returns a new instance of ProvisionNode.



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

def initialize(chain, provision, environment, arguments)
	@chain = chain
	@provision = provision
	@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/provision_node.rb', line 40

def arguments
  @arguments
end

#chainObject (readonly)

Returns the value of attribute chain.



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

def chain
  @chain
end

#environmentObject (readonly)

Returns the value of attribute environment.



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

def environment
  @environment
end

#provisionObject (readonly)

Returns the value of attribute provision.



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

def provision
  @provision
end

Instance Method Details

#==(other) ⇒ Object



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

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

#dependency_node_for(dependency) ⇒ Object



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

def dependency_node_for(dependency)
	DependencyNode.new(@chain, dependency, @environment, @arguments)
end

#hashObject



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

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

#nameObject



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

def name
	@provision.name
end

#task_class(parent_task) ⇒ Object



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

def task_class(parent_task)
	ProvisionTask
end