org.jruby.Ruby.runWithGetsLoop()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中org.jruby.Ruby.runWithGetsLoop方法的一些代码示例,展示了Ruby.runWithGetsLoop的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.runWithGetsLoop方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:runWithGetsLoop

Ruby.runWithGetsLoop介绍

[英]Run the given script with a "while gets; end" loop wrapped around it. This is primarily used for the -n command-line flag, to allow writing a short script that processes input lines using the specified code.
[中]运行给定的脚本,并在其周围环绕一个“while get;end”循环。这主要用于-n命令行标志,以允许编写使用指定代码处理输入行的短脚本。

代码示例

代码示例来源:origin: org.jruby/jruby-complete

/**
 * Run the given script with a "while gets; end" loop wrapped around it.
 * This is primarily used for the -n command-line flag, to allow writing
 * a short script that processes input lines using the specified code.
 *
 * @param scriptNode The root node of the script to execute
 * @param printing Whether $_ should be printed after each loop (as in the
 * -p command-line flag)
 * @param processLineEnds Whether line endings should be processed by
 * setting $\ to $/ and <code>chop!</code>ing every line read
 * @param split Whether to split each line read using <code>String#split</code>
 * bytecode before executing.
 * @return The result of executing the specified script
 */
@Deprecated
public IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean processLineEnds, boolean split, boolean unused) {
  return runWithGetsLoop((RootNode) scriptNode, printing, processLineEnds, split);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

/**
 * Run the given script with a "while gets; end" loop wrapped around it.
 * This is primarily used for the -n command-line flag, to allow writing
 * a short script that processes input lines using the specified code.
 *
 * @param scriptNode The root node of the script to execute
 * @param printing Whether $_ should be printed after each loop (as in the
 * -p command-line flag)
 * @param processLineEnds Whether line endings should be processed by
 * setting $\ to $/ and <code>chop!</code>ing every line read
 * @param split Whether to split each line read using <code>String#split</code>
 * bytecode before executing.
 * @return The result of executing the specified script
 */
@Deprecated
public IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean processLineEnds, boolean split, boolean unused) {
  return runWithGetsLoop(scriptNode, printing, processLineEnds, split);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

/**
 * Run the given script with a "while gets; end" loop wrapped around it.
 * This is primarily used for the -n command-line flag, to allow writing
 * a short script that processes input lines using the specified code.
 *
 * @param scriptNode The root node of the script to execute
 * @param printing Whether $_ should be printed after each loop (as in the
 * -p command-line flag)
 * @param processLineEnds Whether line endings should be processed by
 * setting $\ to $/ and <code>chop!</code>ing every line read
 * @param split Whether to split each line read using <code>String#split</code>
 * bytecode before executing.
 * @return The result of executing the specified script
 */
@Deprecated
public IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean processLineEnds, boolean split, boolean unused) {
  return runWithGetsLoop(scriptNode, printing, processLineEnds, split);
}

代码示例来源:origin: org.jruby/jruby-core

/**
 * Run the given script with a "while gets; end" loop wrapped around it.
 * This is primarily used for the -n command-line flag, to allow writing
 * a short script that processes input lines using the specified code.
 *
 * @param scriptNode The root node of the script to execute
 * @param printing Whether $_ should be printed after each loop (as in the
 * -p command-line flag)
 * @param processLineEnds Whether line endings should be processed by
 * setting $\ to $/ and <code>chop!</code>ing every line read
 * @param split Whether to split each line read using <code>String#split</code>
 * bytecode before executing.
 * @return The result of executing the specified script
 */
@Deprecated
public IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean processLineEnds, boolean split, boolean unused) {
  return runWithGetsLoop((RootNode) scriptNode, printing, processLineEnds, split);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

runWithGetsLoop(scriptNode, config.isAssumePrinting(), config.isProcessLineEnds(),
      config.isSplit());
} else {

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

runWithGetsLoop(scriptNode, config.isAssumePrinting(), config.isProcessLineEnds(),
      config.isSplit());
} else {

代码示例来源:origin: org.jruby/jruby-complete

runWithGetsLoop(scriptNode, config.isAssumePrinting(), config.isProcessLineEnds(),
      config.isSplit());
} else {

代码示例来源:origin: org.jruby/jruby-core

runWithGetsLoop(scriptNode, config.isAssumePrinting(), config.isProcessLineEnds(),
      config.isSplit());
} else {

相关文章

Ruby类方法