MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / initialize

Method initialize

ruby/engine/openstudio_cli.rb:730–740  ·  view source on GitHub ↗

This method instantiates the global variables $main_args, $sub_command, and $sub_args @param [Array] argv The arguments passed through the CLI @return [Object] An instance of the CLI class with initialized globals

(argv)

Source from the content-addressed store, hash-verified

728 # @return [Object] An instance of the CLI class with initialized globals
729 #
730 def initialize(argv)
731 argv = clean_argv(argv)
732 $main_args, $sub_command, $sub_args = split_main_and_subcommand(argv, command_list)
733
734 if $main_args.include? '--verbose'
735 $logger.level = Logger::DEBUG
736 OpenStudio::Logger.instance.standardOutLogger.setLogLevel(OpenStudio::Debug)
737 end
738
739 $logger.info("CLI Parsed Inputs: #{$main_args.inspect} #{$sub_command.inspect} #{$sub_args.inspect}")
740 end
741
742 # Checks to see if it should print the main help, and if not parses the command into a class and executes it
743 def execute

Callers

nothing calls this directly

Calls 6

clean_argvFunction · 0.85
setLogLevelMethod · 0.80
standardOutLoggerMethod · 0.80
infoMethod · 0.80
levelMethod · 0.45

Tested by

no test coverage detected