require File.dirname(__FILE__) + "/cmd" class Stencil class Branches class < b.length } branches.each do |branch| next if ignore.include?(branch) groups << [ branch ] + group(branches, branch) ignore += groups.last end groups end private def group(branches, branch) branches.select do |b| b != branch && b[0..branch.length-1] == branch end end end end end