るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.039秒)

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. module >
  4. comparable >
  5. integer >

ライブラリ

クラス

検索結果

Array#delete_at(pos) -> object | nil (18214.0)

指定された位置 pos にある要素を取り除きそれを返します。 pos が範囲外であったら nil を返します。

...暗黙の型変換を試みます。

@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。

//emlist[例][ruby]{
array = [0, 1, 2, 3, 4]
array.delete_at 2
p array #=> [0, 1, 3, 4]
//}...

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

要素から 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'/>
//}...