Class: JiraDependencyVisualizer::Graph
- Inherits:
-
Object
- Object
- JiraDependencyVisualizer::Graph
- Defined in:
- lib/jira_dependency_visualizer/graph.rb
Overview
Gets Jira issue dependencies and creates a Graphviz graph based on those dependencies
Instance Method Summary collapse
-
#initialize(start_issue_key, jira, excludes = [], colors = {}, graph = nil) ⇒ Graph
constructor
A new instance of Graph.
-
#walk ⇒ Object
Retrieve a list of all tickets dependent to ‘@start_issue_key` and add them to a Graphviz graph.
- #write_graph(filename = './issue_graph.svg', format = 'svg') ⇒ Object
Constructor Details
#initialize(start_issue_key, jira, excludes = [], colors = {}, graph = nil) ⇒ Graph
Returns a new instance of Graph.
14 15 16 17 18 19 20 21 |
# File 'lib/jira_dependency_visualizer/graph.rb', line 14 def initialize(start_issue_key, jira, excludes = [], colors = {}, graph = nil) @start_issue_key = start_issue_key @jira = jira @excludes = excludes @colors = colors @graph = graph || GraphViz.new(start_issue_key.to_sym, type: :digraph) @seen = [] end |
Instance Method Details
#walk ⇒ Object
Retrieve a list of all tickets dependent to ‘@start_issue_key` and add them to a Graphviz graph.
25 26 27 |
# File 'lib/jira_dependency_visualizer/graph.rb', line 25 def walk issue_walker(@start_issue_key) end |
#write_graph(filename = './issue_graph.svg', format = 'svg') ⇒ Object
31 32 33 |
# File 'lib/jira_dependency_visualizer/graph.rb', line 31 def write_graph(filename = './issue_graph.svg', format = 'svg') @graph.output(format.to_sym => filename) end |