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)
| 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 |
nothing calls this directly
no test coverage detected