るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.131秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:delete_attribute[x]

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. bigdecimal to_r
  5. fileutils rm_r

ライブラリ

クラス

検索結果

REXML::Element#delete_attribute(key) -> REXML::Attribute | nil (24407.0)

要素から key という属性名の属性を削除します。

...@param key 削除する要素(文字列(属性名) or REXML::Attributeオブジェクト)

//emlist[][ruby]{
r
equire 'rexml/document'
e = REXML::Element.new("E")
e.add_attribute("x", "foo"); e # => <E x='foo'/>
e.add_attribute("y:x", "bar"); e # => <E x='foo' y:x='bar'/>
e.delete_attribute("x"); e...
...# => <E y:x='bar'/>
//}...