class Bundler::Plugin::Index
def load_index(index_file, global = false)
-
is
(Boolean
) -- the index file global index -
index
(Pathname
) -- file path
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_relative "../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