Method: Bundler::Index#use
- Defined in:
- lib/bundler/index.rb
permalink #use(other) ⇒ Object
Combines indexes proritizing existing specs, like ‘Hash#reverse_merge!` Duplicate specs found in `other` are stored in `@duplicates`.
120 121 122 123 124 125 126 |
# File 'lib/bundler/index.rb', line 120 def use(other) return unless other other.each do |spec| exist?(spec) ? add_duplicate(spec) : add(spec) end self end |