Should be called when any of the instance variables change. Stores the
instance variables in YAML format. (The instance
variables are supposed to be only String key
value pairs)
# File lib/bundler/plugin/index.rb, line 145
def save_index
index = {
"commands" => @commands,
"hooks" => @hooks,
"load_paths" => @load_paths,
"plugin_paths" => @plugin_paths,
"sources" => @sources,
}
require "bundler/yaml_serializer"
SharedHelpers.filesystem_access(index_file) do |index_f|
FileUtils.mkdir_p(index_f.dirname)
File.open(index_f, "w") {|f| f.puts YAMLSerializer.dump(index) }
end
end