lib/berkshelf/config.rb in berkshelf-1.0.0.rc3 vs lib/berkshelf/config.rb in berkshelf-1.0.0
- old
+ new
@@ -64,16 +64,27 @@
# the contents of the file
def file
File.read(path) if File.exists?(path)
end
+ # Instantiate and return or just return the currently instantiated Berkshelf
+ # configuration
+ #
# @return [Config]
def instance
@instance ||= if file
from_json file
else
new
end
+ end
+
+ # Reload the currently instantiated Berkshelf configuration
+ #
+ # @return [Config]
+ def reload
+ @instance = nil
+ self.instance
end
end
# @param [String] path
# @param [Hash] options