るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.121秒)
トップページ > クエリ:t[x] > クエリ:Ruby[x] > 種類:インスタンスメソッド[x] > クエリ:y[x] > クエリ:delete_attribute[x]

別のキーワード

  1. psych psych_y
  2. kernel psych_y
  3. kernel y
  4. psych y
  5. y kernel

ライブラリ

クラス

検索結果

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

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

...key という属性名の属性を削除します。

削除された属性を返します。

key という属性名の属性が存在しない場合は削除されずに、nil を返します。

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

//emlist[]...
...[ruby]{
require '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'/>
//}...