るりまサーチ

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

別のキーワード

  1. _builtin hash
  2. hash []
  3. matrix hash
  4. dbm to_hash
  5. _builtin to_hash

ライブラリ

モジュール

キーワード

検索結果

WEBrick::HTTPRequest#attributes -> Hash (18203.0)

@todo ???

@todo ???

REXML::Element#add_attributes(attrs) -> () (6132.0)

要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。

...
同じ名前の属性がすでにある場合はその属性を新しい
属性で置き換えます。

attrs には Hash もしくは Array を指定できます。
Hash
の場合は、
{ "name1" => "value1", "name2" => "value2", ... }
という形で、配列の場合は
[ ["name1", "valu...
...属性の属性名と属性値の対の集合(Array or Hash)

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("e")
e.add_attributes({"a" => "b", "c" => "d"})
e # => <e a='b' c='d'/>
e = REXML::Element.new("e")
e.add_attributes([["a", "b"], ["c", "d"]])
e # => <e a='b' c='d'/>
//}...

REXML::Attributes#namespaces -> { String => String } (3019.0)

self の中で宣言されている名前空間の集合を返します。

...
Hash
を返します。

//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

p doc.root.attributes...
....namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}...

REXML::SAX2Listener#start_element(uri, localname, qname, attributes) -> () (108.0)

要素が開始されたときに呼び出されるコールバックメソッドです。

...@param localname 接頭辞を取り除いた要素名文字列が渡されます
@param qname 修飾名(qualified-name)文字列、つまり接頭辞を含む文字列が渡されます
@param attribute 属性が { 属性名 => 属性値文字列 } という Hash
で渡されます。...