Class: GitDag::GitGraph
- Inherits:
-
Object
- Object
- GitDag::GitGraph
- Defined in:
- lib/git-dag/git_graph.rb
Instance Method Summary collapse
-
#initialize(git_repo) ⇒ GitGraph
constructor
A new instance of GitGraph.
- #output_dot_file ⇒ Object
Constructor Details
#initialize(git_repo) ⇒ GitGraph
Returns a new instance of GitGraph.
3 4 5 6 7 8 |
# File 'lib/git-dag/git_graph.rb', line 3 def initialize(git_repo) @repo = Grit::Repo.new(git_repo) @branches = @repo.branches @remotes = @repo.remotes @all_branches = @remotes.reject {|r| r.name =~ /HEAD/} + @branches end |
Instance Method Details
#output_dot_file ⇒ Object
10 11 12 13 14 |
# File 'lib/git-dag/git_graph.rb', line 10 def output_dot_file all_commits = build_entire_graph #add_tag_nodes(all_commits) get_dot_str(all_commits) end |