lib/openstudio/analysis/support_files.rb in openstudio-analysis-1.0.0.rc9 vs lib/openstudio/analysis/support_files.rb in openstudio-analysis-1.0.0.rc10
- old
+ new
@@ -16,10 +16,10 @@
#
# @param path_or_filename [String] Full path of the file to be added.
# @return [Boolean] Returns false if the file does not exist
def add(path_or_filename, metadata = {})
if !File.exist?(path_or_filename) && !Dir.exist?(path_or_filename)
- fail "Path or file does not exist and cannot be added: #{path_or_filename}"
+ raise "Path or file does not exist and cannot be added: #{path_or_filename}"
end
# only add if it isn't allready in the list
if @files.find_all { |f| f[:file] == path_or_filename }.empty?
@files << { file: path_or_filename, metadata: metadata }