diff options
Diffstat (limited to 'lib/rubygems/dependency_resolver/composed_set.rb')
-rw-r--r-- | lib/rubygems/dependency_resolver/composed_set.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/rubygems/dependency_resolver/composed_set.rb b/lib/rubygems/dependency_resolver/composed_set.rb new file mode 100644 index 0000000000..fb38128bb0 --- /dev/null +++ b/lib/rubygems/dependency_resolver/composed_set.rb @@ -0,0 +1,18 @@ +class Gem::DependencyResolver::ComposedSet + + def initialize *sets + @sets = sets + end + + def find_all req + res = [] + @sets.each { |s| res += s.find_all(req) } + res + end + + def prefetch reqs + @sets.each { |s| s.prefetch(reqs) } + end + +end + |