Class: Build::Task

Inherits:
Graph::Task
  • Object
show all
Defined in:
lib/build/task.rb

Overview

This task class serves as the base class for the environment specific task classes genearted when adding targets.

Direct Known Subclasses

BuildTask, DependencyTask, ProvisionTask

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(walker, node, group) ⇒ Task

Initialize the task.



18
19
20
21
22
# File 'lib/build/task.rb', line 18

def initialize(walker, node, group)
	super(walker, node)
	
	@group = group
end

Instance Attribute Details

#group ⇒ Object (readonly)

Returns the value of attribute group.



29
30
31
# File 'lib/build/task.rb', line 29

def group
  @group
end

Instance Method Details

#name ⇒ Object



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

def name
	self.to_s
end

#node_string ⇒ Object



42
43
44
# File 'lib/build/task.rb', line 42

def node_string
	@node.name
end

#task_class ⇒ Object



25
26
27
# File 'lib/build/task.rb', line 25

def task_class
	self.class
end

#update ⇒ Object

Apply the node to this task, executing any build logic.



32
33
34
# File 'lib/build/task.rb', line 32

def update
	@node.apply!(self)
end