るりまサーチ

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

別のキーワード

  1. attribute new
  2. attribute value
  3. element add_attribute
  4. rexml/document add_attribute
  5. rexml/document attribute

ライブラリ

クラス

検索結果

REXML::Attributes#each_attribute {|attribute| ... } -> () (33522.0)

各属性に対しブロックを呼び出します。

... REXML::Attribute オブジェクトで渡されます。

//emlist[][ruby]{
r
equire 'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root...
.../a").first

a.attributes.each_attribute do |attr|
p [attr.namespace, attr.name, attr.value]
end
# => ["http://example.org/foo", "att", "1"]
# => ["http://example.org/bar", "att", "2"]
# => ["", "att", "<"]
//}...

RDoc::Context#each_attribute {|a| ... } -> [RDoc::Attr] (30303.0)

追加された RDoc::Attr に対してブロックを評価します。

...追加された RDoc::Attr に対してブロックを評価します。...