Ruby 2.2.0 リファレンスマニュアル > ライブラリ一覧 > rexml/documentライブラリ > REXML::Attributesクラス > new

singleton method REXML::Attributes.new

new(element) -> REXML::Attributes[permalink][rdoc]

空の Attributes オブジェクトを生成します。

どの要素の属性であるかを element で指定します。

通常は REXML::Element.new によって Attributes オブジェクトが生成されるため、このメソッドを使う必要はありません。

[PARAM] element:
属性が属する要素(REXML::Element オブジェクト)