るりまサーチ

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

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. matrix p
  5. kernel p

ライブラリ

モジュール

キーワード

検索結果

<< < ... 2 3 4 >>

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

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

...を呼び出します。

名前には expanded_name(REXML::Namespace#exapnded_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

a.attributes.each do |name, value|
p
[name, value]
end

# => ["foo:att", "1"]
# => ["bar:att", "2"]
# => ["att", "<"]
//}...

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

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

...ttp://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", "<"]
//}...

REXML::Attributes#length -> Integer (3013.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

p
a.attributes.length # => 3
//}...

REXML::Attributes#size -> Integer (3013.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

p
a.attributes.length # => 3
//}...

CGI::HtmlExtension#scrolling_list(name = "", *values) -> String (3004.0)

select 要素を生成します。

...select 要素を生成します。

@param name name 属性の値を指定します。

@param values option 要素を生成するための情報を一つ以上指定します。
それぞれ、文字列、一要素、二要素、三要素の配列を指定することができます...
...値と option 要素の内容になります。
三要素の配列である場合は、順に value 属性の値、option 要素の内容、その option 要素が
選択状態かどうかを表す真偽値となります。

例:
p
opup_menu("name...
...# <OPTION VALUE="foo">foo</OPTION>
# <OPTION VALUE="bar">bar</OPTION>
# <OPTION VALUE="baz">baz</OPTION>
# </SELECT>

p
opup_menu("name", ["foo"], ["bar", true], "baz")
# <SELECT NAME="name">
# <OPTION VALUE="foo">foo</OPTION>...

絞り込み条件を変える

CGI::HtmlExtension#form(method = "post", action = nil, enctype = "application/x-www-form-urlencoded") -> String (104.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

...ます。

@param method method 属性の値として "get" か "post" を指定します。

@param action action 属性の値を指定します。デフォルトは現在の CGI スクリプト名です。

@param enctype enctype 属性の値を指定します。デフォルトは "application/x-w...
...# <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("get"){ "string" }
# <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("get", "url"){ "string" }
# <FORM METHOD="get" ACTION="url" ENCTYPE="application/x-www-form-u...

CGI::HtmlExtension#form(method = "post", action = nil, enctype = "application/x-www-form-urlencoded") { ... } -> String (104.0)

form 要素を生成します。 ブロックを与えると、ブロックを評価した結果が内容になります。

...ます。

@param method method 属性の値として "get" か "post" を指定します。

@param action action 属性の値を指定します。デフォルトは現在の CGI スクリプト名です。

@param enctype enctype 属性の値を指定します。デフォルトは "application/x-w...
...# <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("get"){ "string" }
# <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("get", "url"){ "string" }
# <FORM METHOD="get" ACTION="url" ENCTYPE="application/x-www-form-u...

REXML::Attribute#to_string -> String (13.0)

"name='value'" という形式の文字列を返します。

..."name='value'" という形式の文字列を返します。

//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p
e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}...
<< < ... 2 3 4 >>