Module: Geminabox::GemListMerge::LocalGemsTakePrecedenceOverRemoteGems

Defined in:
lib/geminabox/gem_list_merge.rb

Class Method Summary collapse

Class Method Details

.merge(local_gem_list, remote_gem_list) ⇒ Object



23
24
25
26
# File 'lib/geminabox/gem_list_merge.rb', line 23

def self.merge(local_gem_list, remote_gem_list)
  names = Set.new(local_gem_list.map { |gem| gem[:name] })
  local_gem_list + remote_gem_list.reject { |gem| names.include? gem[:name] }
end