org.jruby.RubyHash.putAll()方法的使用及代码示例

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

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

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);
}

相关文章

微信公众号

最新文章

更多

RubyHash类方法