Examples of processArguments()


Examples of org.jruby.RubyInstanceConfig.processArguments()

        parser.processArguments(args);
        assertFalse(parser.getShouldRunInterpreter());

        args = new String[]{"--help"};
        parser = new RubyInstanceConfig();
        parser.processArguments(args);
        assertFalse(parser.getShouldRunInterpreter());
    }

    public void testCommandTakesOneArgument() {
        String[] args = new String[]{"--command", "gem"};
View Full Code Here

Examples of org.jruby.RubyInstanceConfig.processArguments()

    }

    public void testCommandTakesOneArgument() {
        String[] args = new String[]{"--command", "gem"};
        RubyInstanceConfig parser = new RubyInstanceConfig();
        parser.processArguments(args);
        assertNotNull(parser.getScriptFileName());
    }

    public void testCommandAllowedOnlyOnceAndRemainderAreScriptArgs() {
        String[] args = new String[]{"--command", "gem", "--command", "irb"};
View Full Code Here

Examples of org.jruby.RubyInstanceConfig.processArguments()

    }

    public void testCommandAllowedOnlyOnceAndRemainderAreScriptArgs() {
        String[] args = new String[]{"--command", "gem", "--command", "irb"};
        RubyInstanceConfig parser = new RubyInstanceConfig();
        parser.processArguments(args);
        assertEquals(2, parser.getArgv().length);
        assertEquals("--command", parser.getArgv()[0]);
        assertEquals("irb", parser.getArgv()[1]);
    }
View Full Code Here

Examples of org.jruby.RubyInstanceConfig.processArguments()

    }

    public void testCommandExtractScript() {
        String[] args = new String[] { "-x ../../../test", "testDoc.foo"};
        RubyInstanceConfig parser = new RubyInstanceConfig();
        parser.processArguments(args);
        assertEquals(true, parser.isXFlag());
        assertEquals("testDoc.foo", parser.getScriptFileName());
    }
}
View Full Code Here

Examples of org.jruby.RubyInstanceConfig.processArguments()

        // c.j script args
        String[] newArgs = new String[args.length - 1];
        System.arraycopy(args, 1, newArgs, 0, args.length - 1);
        RubyInstanceConfig config = new RubyInstanceConfig();
        config.setJRubyHome(JRUBY_HOME); // mwalker
        config.processArguments(newArgs);

        System.out.println("Arguments: ");
        for (String arg : config.getArgv())
            System.out.println(arg);
View Full Code Here

Examples of org.wymiwyg.commons.util.arguments.ArgumentHandler.processArguments()

      showHelp(invocationString);
      return;
    }
    final List<String> unusedArguments = new ArrayList<String>();
    try {
      argumentHandler.processArguments(new ArgumentProcessor() {
        public void process(List<String> argumentList) throws InvalidArgumentsException {
          unusedArguments.addAll(argumentList);
         
        }
      });
View Full Code Here

Examples of org.wymiwyg.commons.util.arguments.ArgumentHandler.processArguments()

  public void start(String... args) throws Throwable {
    LauncherArguments arguments;
    try {
      final ArgumentHandler argumentHandler = new ArgumentHandler(args);
      arguments = argumentHandler.getInstance(LauncherArguments.class);
      argumentHandler.processArguments(new ArgumentProcessor() {

        @Override
        public void process(List<String> remaining) throws InvalidArgumentsException {
          if (remaining.size() > 0) {
            throw new InvalidArgumentsException("The following arguments could not be understood: " + remaining);
View Full Code Here

Examples of org.wymiwyg.commons.util.arguments.ArgumentHandler.processArguments()

    }
    if (helpArguments.getShowHelp()) {
      showHelp();
      return;
    }
    argumentHandler.processArguments(new ArgumentProcessor() {
      /**
       * @see org.wymiwyg.commons.util.arguments.ArgumentProcessor#process(java.util.List)
       */
      public void process(List<String> argumentList) {
        if (argumentList.size() > 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.