Method not available on this version
This method is only available on newer versions.
The first available version (v2_6_3) is shown here.
load_index(index_file, global = false)
private
Reads the index file from the directory and initializes the instance
variables.
It skips the sources if the second param is true @param [Pathname] index file path @param [Boolean] is the index file
global index
# File lib/bundler/plugin/index.rb, line 124
def load_index(index_file, global = false)
SharedHelpers.filesystem_access(index_file, :read) do |index_f|
valid_file = index_f && index_f.exist? && !index_f.size.zero?
break unless valid_file
data = index_f.read
require "bundler/yaml_serializer"
index = YAMLSerializer.load(data)
@commands.merge!(index["commands"])
@hooks.merge!(index["hooks"])
@load_paths.merge!(index["load_paths"])
@plugin_paths.merge!(index["plugin_paths"])
@sources.merge!(index["sources"]) unless global
end
end