Sha256: 1e65c9dbf7a45608a28b9d12701db482cfb859d80b38ce57541593d3feaabb0f

Contents?: true

Size: 692 Bytes

Versions: 1

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

class Version
  OS_HPXML_Version = '1.1.0' # Version of the OS-HPXML workflow
  OS_Version = '3.1.0' # Required version of OpenStudio (can be 'X.X' or 'X.X.X')
  HPXML_Version = '3.0' # HPXML schemaVersion

  def self.check_openstudio_version
    if not OpenStudio.openStudioVersion.start_with? OS_Version
      if OS_Version.count('.') == 2
        fail "OpenStudio version #{OS_Version} is required."
      else
        fail "OpenStudio version #{OS_Version}.X is required."
      end
    end
  end

  def self.check_hpxml_version(hpxml_version)
    if hpxml_version != HPXML_Version
      fail "HPXML version #{HPXML_Version} is required."
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
urbanopt-cli-0.5.2 example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/version.rb