Class: Build::TargetNode
- Inherits:
-
Graph::Node
- Object
- Graph::Node
- Build::TargetNode
- Defined in:
- lib/build/controller.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, &update) ⇒ TargetNode
constructor
A new instance of TargetNode.
- #inspect ⇒ Object
Constructor Details
#initialize(task_class, &update) ⇒ TargetNode
Returns a new instance of TargetNode.
66 67 68 69 70 71 |
# File 'lib/build/controller.rb', line 66 def initialize(task_class, &update) @update = update @task_class = task_class super(Files::Paths::NONE, :inherit, @update) end |
Instance Attribute Details
#task_class ⇒ Object (readonly)
Returns the value of attribute task_class.
73 74 75 |
# File 'lib/build/controller.rb', line 73 def task_class @task_class end |
Instance Method Details
#apply!(scope) ⇒ Object
75 76 77 |
# File 'lib/build/controller.rb', line 75 def apply!(scope) scope.instance_exec(&@update) end |
#inspect ⇒ Object
79 80 81 |
# File 'lib/build/controller.rb', line 79 def inspect @task_class.name.inspect end |