Class: TFSGraph::BranchAssociator
- Inherits:
-
Object
- Object
- TFSGraph::BranchAssociator
- Defined in:
- lib/tfs_graph/associators/branch_associator.rb
Class Method Summary collapse
- .associate(changesets) ⇒ Object
-
.associate_groups(sets_by_branch) ⇒ Object
sets up parent/child relationships.
Class Method Details
.associate(changesets) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/tfs_graph/associators/branch_associator.rb', line 12 def associate(changesets) return if changesets.empty? change = changesets.first root = change.merges.max return if root.nil? change.parent = root.id change.save end |
.associate_groups(sets_by_branch) ⇒ Object
sets up parent/child relationships
6 7 8 9 10 |
# File 'lib/tfs_graph/associators/branch_associator.rb', line 6 def associate_groups(sets_by_branch) sets_by_branch.each do |group| associate(group) end end |