openstudiocore/src/cli/openstudio_cli.rb
# Executes the OpenStudio command to return the EnergyPlus version
#
# @param [Array] sub_argv Options passed to the openstudio_version command from the user input
# @return [Fixnum] Return status
#
Executes the OpenStudio command to return the EnergyPlus version
Executes the OpenStudio command to return the EnergyPlus version
def execute(sub_argv)
    $logger.info "EnergyPlusVersion, sub_argv = #{sub_argv}"
    options = {}
    opts = OptionParser.new do |o|
      o.banner = 'Usage: openstudio energyplus_version'
    end
    argv = parse_options(opts, sub_argv)
    return 0 if argv == nil
    $logger.debug("EnergyPlusVersion command: #{argv.inspect} #{options.inspect}")
    unless argv == []
      $logger.error 'Arguments passed to the energyplus_version command.'
      return 1
    end
    safe_puts OpenStudio.energyPlusVersion
    0
  end
def execute ( sub_argv ) $logger . info "EnergyPlusVersion, sub_argv = #{sub_argv}" options = { } opts = OptionParser . new do | o | o . banner = 'Usage: openstudio energyplus_version' end argv = parse_options ( opts , sub_argv ) return 0 if argv == nil $logger . debug ( "EnergyPlusVersion command: #{argv.inspect} #{options.inspect}" ) unless argv == [ ] $logger . error 'Arguments passed to the energyplus_version command.' return 1 end safe_puts OpenStudio . energyPlusVersion 0 end
Executes the OpenStudio command to return the EnergyPlus version
Executes the OpenStudio command to return the EnergyPlus version
# Parse the options
None
Fixnum
sub_argv
<not_specific>
<not_specific>
sub_argv Options passed to the openstudio_version command from the user input
sub_argv Options passed to the openstudio_version command from the user input