Class: XcodeArchiveCache::BuildGraph::Graph
- Inherits:
-
Object
- Object
- XcodeArchiveCache::BuildGraph::Graph
- Defined in:
- lib/build_graph/graph.rb
Instance Attribute Summary collapse
-
#dependent_build_settings ⇒ XcodeArchiveCache::BuildSettings::Container
Root target build settings.
-
#nodes ⇒ Array<Node>
readonly
Graph nodes.
-
#project ⇒ Xcodeproj::Project
readonly
Project.
Instance Method Summary collapse
- #add_multiple_nodes(new_nodes) ⇒ Object
-
#initialize(project) ⇒ Graph
constructor
A new instance of Graph.
- #node_by_name(name) ⇒ XcodeArchiveCache::BuildGraph::Node
- #root_node ⇒ XcodeArchiveCache::BuildGraph::Node
- #to_s ⇒ Object
Constructor Details
#initialize(project) ⇒ Graph
Returns a new instance of Graph.
18 19 20 21 |
# File 'lib/build_graph/graph.rb', line 18 def initialize(project) @nodes = [] @project = project end |
Instance Attribute Details
#dependent_build_settings ⇒ XcodeArchiveCache::BuildSettings::Container
Returns root target build settings.
14 15 16 |
# File 'lib/build_graph/graph.rb', line 14 def dependent_build_settings @dependent_build_settings end |
#nodes ⇒ Array<Node> (readonly)
Returns graph nodes.
6 7 8 |
# File 'lib/build_graph/graph.rb', line 6 def nodes @nodes end |
#project ⇒ Xcodeproj::Project (readonly)
Returns project.
10 11 12 |
# File 'lib/build_graph/graph.rb', line 10 def project @project end |
Instance Method Details
#add_multiple_nodes(new_nodes) ⇒ Object
32 33 34 |
# File 'lib/build_graph/graph.rb', line 32 def add_multiple_nodes(new_nodes) @nodes += new_nodes end |
#node_by_name(name) ⇒ XcodeArchiveCache::BuildGraph::Node
28 29 30 |
# File 'lib/build_graph/graph.rb', line 28 def node_by_name(name) nodes.select {|node| node.name == name}.first end |
#root_node ⇒ XcodeArchiveCache::BuildGraph::Node
38 39 40 |
# File 'lib/build_graph/graph.rb', line 38 def root_node nodes.select {|node| node.is_root}.first end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/build_graph/graph.rb', line 42 def to_s nodes.map(&:to_s).join("\n") end |