src/cli/openstudio_cli.rb
# Evaluates the RUBY_VERSION constant and returns it
#
# @param [Array] sub_argv Options passed to the ruby_version command from the user input
# @return [Fixnum] Return status
#
Evaluates the RUBY_VERSION constant and returns it
Evaluates the RUBY_VERSION constant and returns it
def execute(sub_argv)
    $logger.info "RubyVersion, sub_argv = #{sub_argv}"
    options = {}
    opts = OptionParser.new do |o|
      o.banner = 'Usage: openstudio ruby_version'
    end
    argv = parse_options(opts, sub_argv)
    return 0 if argv == nil
    $logger.debug("RubyVersion command: #{argv.inspect} #{options.inspect}")
    unless argv == []
      $logger.error 'Arguments passed to the ruby_version command.'
      return 1
    end
    safe_puts RUBY_VERSION
    0
  end
def execute ( sub_argv ) $logger . info "RubyVersion, sub_argv = #{sub_argv}" options = { } opts = OptionParser . new do | o | o . banner = 'Usage: openstudio ruby_version' end argv = parse_options ( opts , sub_argv ) return 0 if argv == nil $logger . debug ( "RubyVersion command: #{argv.inspect} #{options.inspect}" ) unless argv == [ ] $logger . error 'Arguments passed to the ruby_version command.' return 1 end safe_puts RUBY_VERSION 0 end
Evaluates the RUBY_VERSION constant and returns it
Evaluates the RUBY_VERSION constant and returns it
# Parse the options
None
Fixnum
sub_argv
<not_specific>
<not_specific>
sub_argv Options passed to the ruby_version command from the user input
sub_argv Options passed to the ruby_version command from the user input