lib/build/target_node.rb in build-1.0.10 vs lib/build/target_node.rb in build-1.1
- old
+ new
@@ -21,13 +21,14 @@
require 'build/files'
require 'build/graph'
module Build
class TargetNode < Graph::Node
- def initialize(task_class, target)
+ 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
@@ -36,10 +37,10 @@
def name
@task_class.name
end
def apply!(scope)
- scope.instance_exec(&@target.build)
+ scope.instance_exec(*@arguments, &@target.build)
end
def inspect
@task_class.name.inspect
end