openstudiocore/src/cli/openstudio_cli.rb
def execute(sub_argv)
    require 'irb'

    $logger.info "InteractiveRubyShell, sub_argv = #{sub_argv}"

    options = {}

    opts = OptionParser.new do |o|
      o.banner = 'Usage: openstudio interactive_ruby'
    end

    # Parse the options
    argv = parse_options(opts, sub_argv)
    return 0 if argv == nil

    $logger.debug("InteractiveRubyShell command: #{argv.inspect} #{options.inspect}")

    unless argv == []
      $logger.error 'Extra arguments passed to the i command.'
      return 1
    end

    IRB.start_session(binding)

    0
  end
# Executes the commands to get into an IRB prompt
#
# @param [Array] sub_argv Options passed to the interactive_ruby command from the user input
# @return [Fixnum] Return status
#
Executes the commands to get into an IRB prompt
Executes the commands to get into an IRB prompt
def execute(sub_argv)
    require 'irb'
    $logger.info "InteractiveRubyShell, sub_argv = #{sub_argv}"
    options = {}
    opts = OptionParser.new do |o|
      o.banner = 'Usage: openstudio interactive_ruby'
    end
    argv = parse_options(opts, sub_argv)
    return 0 if argv == nil
    $logger.debug("InteractiveRubyShell command: #{argv.inspect} #{options.inspect}")
    unless argv == []
      $logger.error 'Extra arguments passed to the i command.'
      return 1
    end
    IRB.start_session(binding)
    0
  end
def execute ( sub_argv ) require 'irb' $logger . info "InteractiveRubyShell, sub_argv = #{sub_argv}" options = { } opts = OptionParser . new do | o | o . banner = 'Usage: openstudio interactive_ruby' end argv = parse_options ( opts , sub_argv ) return 0 if argv == nil $logger . debug ( "InteractiveRubyShell command: #{argv.inspect} #{options.inspect}" ) unless argv == [ ] $logger . error 'Extra arguments passed to the i command.' return 1 end IRB . start_session ( binding ) 0 end
Executes the commands to get into an IRB prompt
Executes the commands to get into an IRB prompt
# Parse the options
None
Fixnum
sub_argv
sub_argv Options passed to the interactive_ruby command from the user input
sub_argv Options passed to the interactive_ruby command from the user input