Method: Bundler::Index#add_source

Defined in:
lib/bundler/index.rb

#add_source(index) ⇒ Object

Raises:

  • (ArgumentError)
[View source]

161
162
163
164
165
# File 'lib/bundler/index.rb', line 161

def add_source(index)
  raise ArgumentError, "Source must be an index, not #{index.class}" unless index.is_a?(Index)
  @sources << index
  @sources.uniq! # need to use uniq! here instead of checking for the item before adding
end