本文整理了Java中org.jruby.RubyHash.putAll
方法的一些代码示例,展示了RubyHash.putAll
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RubyHash.putAll
方法的具体详情如下:
包路径:org.jruby.RubyHash
类名称:RubyHash
方法名:putAll
暂无
代码示例来源:origin: asciidoctor/asciidoctorj
@Override
public void push_include(String data, String file, String path, int lineNumber, Map<String, Object> attributes) {
RubyHash attributeHash = RubyHash.newHash(getRuntime());
attributeHash.putAll(attributes);
getRubyProperty("push_include", data, file, path, lineNumber, attributes);
}
代码示例来源:origin: org.asciidoctor/asciidoctorj
@Override
public void push_include(String data, String file, String path, int lineNumber, Map<String, Object> attributes) {
RubyHash attributeHash = RubyHash.newHash(getRuntime());
attributeHash.putAll(attributes);
getRubyProperty("push_include", data, file, path, lineNumber, attributes);
}
代码示例来源:origin: asciidoctor/asciidoctorj
@Override
public Column createTableColumn(Table parent, int index, Map<String, Object> attributes) {
Ruby rubyRuntime = JRubyRuntimeContext.get(parent);
RubyHash rubyAttributes = RubyHash.newHash(rubyRuntime);
rubyAttributes.putAll(attributes);
IRubyObject[] parameters = {
((StructuralNodeImpl) parent).getRubyObject(),
RubyFixnum.newFixnum(rubyRuntime, index),
rubyAttributes}; // No cursor parameter yet
return (Column) NodeConverter.createASTNode(rubyRuntime, TABLE_COLUMN_CLASS, parameters);
}
代码示例来源:origin: org.asciidoctor/asciidoctorj
@Override
public Column createTableColumn(Table parent, int index, Map<String, Object> attributes) {
Ruby rubyRuntime = JRubyRuntimeContext.get(parent);
RubyHash rubyAttributes = RubyHash.newHash(rubyRuntime);
rubyAttributes.putAll(attributes);
IRubyObject[] parameters = {
((StructuralNodeImpl) parent).getRubyObject(),
RubyFixnum.newFixnum(rubyRuntime, index),
rubyAttributes}; // No cursor parameter yet
return (Column) NodeConverter.createASTNode(rubyRuntime, TABLE_COLUMN_CLASS, parameters);
}
代码示例来源:origin: org.asciidoctor/asciidoctorj
@Override
public Table createTable(StructuralNode parent, Map<String, Object> attributes) {
Ruby rubyRuntime = JRubyRuntimeContext.get(parent);
RubyHash rubyAttributes = RubyHash.newHash(rubyRuntime);
rubyAttributes.putAll(attributes);
IRubyObject[] parameters = {
((StructuralNodeImpl) parent).getRubyObject(),
rubyAttributes};
Table ret = (Table) NodeConverter.createASTNode(rubyRuntime, TABLE_CLASS, parameters);
ret.setAttribute("rowcount", 0, false);
return ret;
}
代码示例来源:origin: asciidoctor/asciidoctorj
@Override
public Table createTable(StructuralNode parent, Map<String, Object> attributes) {
Ruby rubyRuntime = JRubyRuntimeContext.get(parent);
RubyHash rubyAttributes = RubyHash.newHash(rubyRuntime);
rubyAttributes.putAll(attributes);
IRubyObject[] parameters = {
((StructuralNodeImpl) parent).getRubyObject(),
rubyAttributes};
Table ret = (Table) NodeConverter.createASTNode(rubyRuntime, TABLE_CLASS, parameters);
ret.setAttribute("rowcount", 0, false);
return ret;
}
代码示例来源:origin: asciidoctor/asciidoctorj
@Override
public Cell createTableCell(Column column, String text, Map<String, Object> attributes) {
Ruby rubyRuntime = JRubyRuntimeContext.get(column);
RubyHash rubyAttributes = RubyHash.newHash(rubyRuntime);
rubyAttributes.putAll(attributes);
IRubyObject[] parameters = {
((ColumnImpl) column).getRubyObject(),
text != null ? rubyRuntime.newString(text) : rubyRuntime.getNil(),
rubyAttributes}; // No cursor parameter yet
return (Cell) NodeConverter.createASTNode(rubyRuntime, TABLE_CELL_CLASS, parameters);
}
代码示例来源:origin: org.asciidoctor/asciidoctorj
@Override
public Cell createTableCell(Column column, String text, Map<String, Object> attributes) {
Ruby rubyRuntime = JRubyRuntimeContext.get(column);
RubyHash rubyAttributes = RubyHash.newHash(rubyRuntime);
rubyAttributes.putAll(attributes);
IRubyObject[] parameters = {
((ColumnImpl) column).getRubyObject(),
text != null ? rubyRuntime.newString(text) : rubyRuntime.getNil(),
rubyAttributes}; // No cursor parameter yet
return (Cell) NodeConverter.createASTNode(rubyRuntime, TABLE_CELL_CLASS, parameters);
}
内容来源于网络,如有侵权,请联系作者删除!