Class: Build::DependencyNode
- Inherits:
-
Graph::Node
- Object
- Graph::Node
- Build::DependencyNode
- Defined in:
- lib/build/dependency_node.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#chain ⇒ Object
readonly
Returns the value of attribute chain.
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(chain, dependency, environment, arguments) ⇒ DependencyNode
constructor
A new instance of DependencyNode.
- #name ⇒ Object
- #provision_node_for(provision) ⇒ Object
- #provisions ⇒ Object
- #public? ⇒ Boolean
- #task_class(parent_task) ⇒ Object
Constructor Details
#initialize(chain, dependency, environment, arguments) ⇒ DependencyNode
Returns a new instance of DependencyNode.
27 28 29 30 31 32 33 34 35 |
# File 'lib/build/dependency_node.rb', line 27 def initialize(chain, dependency, environment, arguments) @chain = chain @dependency = dependency @environment = environment @arguments = arguments # Wait here, for all dependent targets, to be done: super(Files::List::NONE, :inherit) end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
40 41 42 |
# File 'lib/build/dependency_node.rb', line 40 def arguments @arguments end |
#chain ⇒ Object (readonly)
Returns the value of attribute chain.
37 38 39 |
# File 'lib/build/dependency_node.rb', line 37 def chain @chain end |
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
38 39 40 |
# File 'lib/build/dependency_node.rb', line 38 def dependency @dependency end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
39 40 41 |
# File 'lib/build/dependency_node.rb', line 39 def environment @environment end |
Instance Method Details
#==(other) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/build/dependency_node.rb', line 42 def == other super and @chain == other.chain and @dependency == other.dependency and @environment == other.environment and @arguments == other.arguments end |
#hash ⇒ Object
50 51 52 |
# File 'lib/build/dependency_node.rb', line 50 def hash super ^ @chain.hash ^ @dependency.hash ^ @environment.hash ^ @arguments.hash end |
#name ⇒ Object
58 59 60 |
# File 'lib/build/dependency_node.rb', line 58 def name @dependency.name end |
#provision_node_for(provision) ⇒ Object
70 71 72 |
# File 'lib/build/dependency_node.rb', line 70 def provision_node_for(provision) ProvisionNode.new(@chain, provision, @environment, @arguments) end |
#provisions ⇒ Object
62 63 64 |
# File 'lib/build/dependency_node.rb', line 62 def provisions @chain.resolved[@dependency] end |
#public? ⇒ Boolean
66 67 68 |
# File 'lib/build/dependency_node.rb', line 66 def public? @dependency.public? end |
#task_class(parent_task) ⇒ Object
54 55 56 |
# File 'lib/build/dependency_node.rb', line 54 def task_class(parent_task) DependencyTask end |