Class: Build::TargetNode
- Inherits:
-
Graph::Node
- Object
- Graph::Node
- Build::TargetNode
- Defined in:
- lib/build/target_node.rb
Instance Attribute Summary collapse
-
#task_class ⇒ Object
readonly
Returns the value of attribute task_class.
Instance Method Summary collapse
- #apply!(scope) ⇒ Object
-
#initialize(task_class, target, arguments) ⇒ TargetNode
constructor
A new instance of TargetNode.
- #inspect ⇒ Object
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(task_class, target, arguments) ⇒ TargetNode
Returns a new instance of TargetNode.
26 27 28 29 30 31 32 33 |
# File 'lib/build/target_node.rb', line 26 def initialize(task_class, target, arguments) @target = target @task_class = task_class @arguments = arguments # Wait here, for all dependent targets, to be done: super(Files::List::NONE, :inherit, target) end |
Instance Attribute Details
#task_class ⇒ Object (readonly)
Returns the value of attribute task_class.
35 36 37 |
# File 'lib/build/target_node.rb', line 35 def task_class @task_class end |
Instance Method Details
#apply!(scope) ⇒ Object
41 42 43 |
# File 'lib/build/target_node.rb', line 41 def apply!(scope) scope.instance_exec(*@arguments, &@target.build) end |
#inspect ⇒ Object
45 46 47 |
# File 'lib/build/target_node.rb', line 45 def inspect @task_class.name.inspect end |
#name ⇒ Object
37 38 39 |
# File 'lib/build/target_node.rb', line 37 def name @task_class.name end |
#to_s ⇒ Object
49 50 51 |
# File 'lib/build/target_node.rb', line 49 def to_s "#<#{self.class} #{@target.name}>" end |