るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.171秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:RUBY[x] > クエリ:attributes_of[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

検索結果

REXML::DocType#attributes_of(element) -> [REXML::Attribute] (24425.0)

DTD 内の属性リスト宣言で、 element という名前の要素に対し宣言されている 属性の名前とデフォルト値を REXML::Attribute の配列で返します。

...デフォルト値を REXML::Attribute の配列で返します。

名前とデフォルト値のペアは、各 Attribute オブジェクトの
R
EXML::Attribute#name と
R
EXML::Attribute#value で表現されます。

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

doctype = REXML::Document.new(<<EOS...
...author CDATA #REQUIRED
title CDATA #REQUIRED
publisher CDATA "foobar publisher">
]>
EOS

p doctype.attributes_of("book")
# => [author='', title='', publisher='foobar publisher']
p doctype.attributes_of("book")[0].name # => "author"
p doctype.attributes_of("book")[0].val...