るりまサーチ

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

別のキーワード

  1. _builtin first
  2. array first
  3. range first
  4. matrix first_minor
  5. enumerable first

ライブラリ

クラス

検索結果

REXML::Attributes#each {|name, value| ... } -> () (18138.0)

各属性の名前と値に対しブロックを呼び出します。

...す。

//emlist[][ruby]{
require '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 do |name, value|
p...

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

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

...す。

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