lib/openstudio/extension.rb in openstudio-extension-0.2.0 vs lib/openstudio/extension.rb in openstudio-extension-0.2.1

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + # ******************************************************************************* # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC. # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: @@ -99,15 +101,13 @@ ## # @return [Array]: Array of measure directories def self.all_measure_dirs result = [] all_extensions.each do |obj| - begin - dir = obj.new.measures_dir - result << dir if dir - rescue StandardError - end + dir = obj.new.measures_dir + result << dir if dir + rescue StandardError end return result.uniq end ## @@ -115,14 +115,12 @@ ## # @return [Array] Array of measure resource directories def self.all_file_dirs result = [] all_extensions.each do |obj| - begin - dir = obj.new.files_dir - result << dir if dir - rescue StandardError - end + dir = obj.new.files_dir + result << dir if dir + rescue StandardError end return result.uniq end ##