Refactor: Removing the duplicated code.

This commit is contained in:
Sato Hiroyuki 2013-03-07 20:36:40 +09:00
parent 79cd1ca304
commit b7e5f4556b
3 changed files with 38 additions and 46 deletions

View file

@ -26,5 +26,14 @@ module Network
0
end
end
def parents(map)
@commit.parents.map do |p|
if map.include?(p.id)
map[p.id]
end
end
.compact
end
end
end