Class: ComponentDependencyGraph
- Inherits:
-
Object
- Object
- ComponentDependencyGraph
- Defined in:
- lib/cpp_dependency_graph/component_dependency_graph.rb
Overview
Dependency tree/graph of entire project
Instance Method Summary collapse
- #all_cyclic_links ⇒ Object
- #all_links ⇒ Object
-
#initialize(project) ⇒ ComponentDependencyGraph
constructor
A new instance of ComponentDependencyGraph.
- #links(name) ⇒ Object
Constructor Details
#initialize(project) ⇒ ComponentDependencyGraph
Returns a new instance of ComponentDependencyGraph.
9 10 11 |
# File 'lib/cpp_dependency_graph/component_dependency_graph.rb', line 9 def initialize(project) @project = project end |
Instance Method Details
#all_cyclic_links ⇒ Object
17 18 19 |
# File 'lib/cpp_dependency_graph/component_dependency_graph.rb', line 17 def all_cyclic_links @all_cyclic_links ||= build_cyclic_links end |
#all_links ⇒ Object
13 14 15 |
# File 'lib/cpp_dependency_graph/component_dependency_graph.rb', line 13 def all_links @all_links ||= build_hash_links end |
#links(name) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/cpp_dependency_graph/component_dependency_graph.rb', line 21 def links(name) return {} unless all_links.key?(name) links = incoming_links(name) links.merge!(outgoing_links(name)) links end |