本文整理了Java中org.jruby.Ruby.getArgsFile
方法的一些代码示例,展示了Ruby.getArgsFile
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ruby.getArgsFile
方法的具体详情如下:
包路径:org.jruby.Ruby
类名称:Ruby
方法名:getArgsFile
暂无
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public IRubyObject getValue() {
return runtime.getArgsFile();
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public IRubyObject getValue() {
return runtime.getArgsFile();
}
代码示例来源:origin: org.jruby/jruby-core
public IRubyObject getValue() {
return runtime.getArgsFile();
}
代码示例来源:origin: org.jruby/jruby-complete
public IRubyObject getValue() {
return runtime.getArgsFile();
}
代码示例来源:origin: org.jruby/jruby-core
public static ArgsFileData getArgsFileData(Ruby runtime) {
return (ArgsFileData) runtime.getArgsFile().dataGetStruct();
}
代码示例来源:origin: org.jruby/jruby-complete
public static ArgsFileData getArgsFileData(Ruby runtime) {
return (ArgsFileData) runtime.getArgsFile().dataGetStruct();
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
public static IRubyObject readlines(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyArgsFile.readlines(context, context.runtime.getArgsFile(), args);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "readlines", optional = 1, module = true, visibility = PRIVATE)
public static IRubyObject readlines(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyArgsFile.readlines(context, context.runtime.getArgsFile(), args);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "readlines", optional = 1, module = true, visibility = PRIVATE)
public static IRubyObject readlines(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyArgsFile.readlines(context, context.runtime.getArgsFile(), args);
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
public static IRubyObject readlines(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyArgsFile.readlines(context, context.runtime.getArgsFile(), args);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "gets", optional = 1, module = true, visibility = PRIVATE)
public static IRubyObject gets(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyArgsFile.gets(context, context.runtime.getArgsFile(), args);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@JRubyMethod(name = "gets", optional = 1, module = true, visibility = PRIVATE)
public static IRubyObject gets(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
return RubyArgsFile.gets(context, context.runtime.getArgsFile(), args);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private void incrementLineno(Ruby runtime, OpenFile myOpenFile) {
int lineno = myOpenFile.getLineNumber() + 1;
myOpenFile.setLineNumber(lineno);
runtime.setCurrentLine(lineno);
RubyArgsFile.setCurrentLineNumber(runtime.getArgsFile(), lineno);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public IRubyObject set(IRubyObject value) {
int line = (int)value.convertToInteger().getLongValue();
runtime.setCurrentLine(line);
RubyArgsFile.setCurrentLineNumber(runtime.getArgsFile(), line);
return value;
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
public static IRubyObject gets(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Ruby runtime = context.runtime;
IRubyObject argsFile = runtime.getArgsFile();
if (recv == argsFile) {
return RubyArgsFile.gets(context, argsFile, args);
}
return sites(context).gets.call(context, argsFile, argsFile, args);
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(optional = 1, module = true, visibility = PRIVATE)
public static IRubyObject gets(ThreadContext context, IRubyObject recv, IRubyObject[] args) {
Ruby runtime = context.runtime;
IRubyObject argsFile = runtime.getArgsFile();
if (recv == argsFile) {
return RubyArgsFile.gets(context, argsFile, args);
}
return sites(context).gets.call(context, argsFile, argsFile, args);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public IRubyObject set(IRubyObject value) {
int line = (int)value.convertToInteger().getLongValue();
runtime.setCurrentLine(line);
RubyArgsFile.setCurrentLineNumber(runtime.getArgsFile(), line);
return value;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private void incrementLineno(Ruby runtime, OpenFile myOpenFile) {
int lineno = myOpenFile.getLineNumber() + 1;
myOpenFile.setLineNumber(lineno);
runtime.setCurrentLine(lineno);
RubyArgsFile.setCurrentLineNumber(runtime.getArgsFile(), lineno);
}
代码示例来源:origin: org.jruby/jruby-complete
@JRubyMethod(name = "initialize", visibility = PRIVATE, rest = true)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
final Ruby runtime = context.runtime;
final RubyArray argv;
if (args.length == 1 && args[0] == null) {
argv = runtime.getObject().getConstant("ARGV").convertToArray();
} else {
argv = runtime.newArray(args);
}
// ARGF is intended to be a singleton from a Ruby perspective but it is still
// possible for someone to ARGF.class.new. We do still want a global view of
// ARGF otherwise getline and rewind in IO would have to keep track of the n
// instances in play. So all instances will share
if (runtime.getArgsFile() == null) {
dataWrapStruct(new ArgsFileData(runtime, argv));
} else {
ArgsFileData data = (ArgsFileData) runtime.getArgsFile().dataGetStruct();
dataWrapStruct(data);
data.setArgs(argv);
}
return this;
}
代码示例来源:origin: org.jruby/jruby-core
@JRubyMethod(name = "initialize", visibility = PRIVATE, rest = true)
public IRubyObject initialize(ThreadContext context, IRubyObject[] args) {
final Ruby runtime = context.runtime;
final RubyArray argv;
if (args.length == 1 && args[0] == null) {
argv = runtime.getObject().getConstant("ARGV").convertToArray();
} else {
argv = runtime.newArray(args);
}
// ARGF is intended to be a singleton from a Ruby perspective but it is still
// possible for someone to ARGF.class.new. We do still want a global view of
// ARGF otherwise getline and rewind in IO would have to keep track of the n
// instances in play. So all instances will share
if (runtime.getArgsFile() == null) {
dataWrapStruct(new ArgsFileData(runtime, argv));
} else {
ArgsFileData data = (ArgsFileData) runtime.getArgsFile().dataGetStruct();
dataWrapStruct(data);
data.setArgs(argv);
}
return this;
}
内容来源于网络,如有侵权,请联系作者删除!