るりまサーチ

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

別のキーワード

  1. net/http get
  2. http start
  3. http get
  4. net/http start
  5. net/http fetch

検索結果

<< 1 2 > >>

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

@todo ???

@todo ???

REXML::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (3054.0)

namespace と name で特定される属性を返します。

...<<-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.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "at...
...t") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt") # => nil
//}...

REXML::Attributes#delete(attribute) -> REXML::Element (3036.0)

指定した属性を取り除きます。

...="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.delete("att") # => <a foo:att='1' bar:att='2'/>
a.attributes.delete("foo:att") # => <a bar:att='2'/>
attr = a.attributes.g...
...et_attribute("bar:att")
a.attributes.delete(attr) # => <a/>
//}...

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

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

...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::Attributes#[](name) -> String | nil (3030.0)

属性名nameの属性値を返します。

...な場合は
REXML::Attributes#get_attribute を使ってください。

nameという属性名の属性がない場合は nil を返します。

@param name 属性名(文字列)

//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 a.attributes["att"] # => "<"
p a.attributes["bar:att"] # => "2"
//}...

絞り込み条件を変える

REXML::Attributes#[]=(name, value) (3030.0)

指定した属性を更新します。

...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["att"] = "9"
a.attributes["foo:attt"] = "8"
a # => <a foo:att='1' bar:att='2' att='9' foo:attt='8'/>
//}

@see REXML::Attributes...

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

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

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

REXML::Attributes#get_attribute(name) -> Attribute | nil (3030.0)

name という名前の属性を取得します。

...e REXML::Attributes#[]

//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.get_attr...
...ibute("att") # => att='&lt;'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}...

REXML::Attributes#prefixes -> [String] (3024.0)

self の中で宣言されている prefix の集合を 文字列の配列で返します。

...'

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.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}...

REXML::Attributes#delete_all(name) -> [REXML::Attribute] (3018.0)

name という名前を持つ属性をすべて削除します。

...ml/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.delete_all("att") # => [att='&lt;']
a # => <a foo:att='1' bar:a...

絞り込み条件を変える

<< 1 2 > >>