このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ

Ruby 2.3.0 リファレンスマニュアル

instance method REXML::Element#has_attributes?

has_attributes? -> bool[permalink][rdoc]

要素が属性を1つ以上持っていれば真を返します。