るりまサーチ (Ruby 3.3)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.064秒)
トップページ > クエリ:IO.new[x] > クエリ:dump[x] > クエリ:readlines[x] > クラス:REXML::Child[x] > バージョン:3.3[x]

別のキーワード

  1. argf.class lines
  2. argf.class each_line
  3. argf.class each
  4. argf.class readlines
  5. argf.class readline

ライブラリ

検索結果

REXML::Child#previous_sibling=(other) (18358.0)

other を self の前の隣接ノードとします。

other を self の前の隣接ノードとします。

つまり、親ノードが持つ子ノード列の self の前に
other を挿入します。

@param other 挿入するノード

//emlist[][ruby]{
require 'rexml/document'

a = REXML::Element.new("a")
b = a.add_element("b")
c = REXML::Element.new("c")
b.next_sibling = c
d = REXML::Element.new("d")
b.previous_sibling = d

p a.to_s # =>...