372件ヒット
[1-100件を表示]
(0.098秒)
ライブラリ
- ビルトイン (228)
-
irb
/ cmd / help (12) - resolv (24)
-
rexml
/ document (108)
クラス
- Encoding (12)
-
IRB
:: ExtendCommand :: Help (12) - MatchData (12)
- Module (192)
-
REXML
:: Attribute (12) -
REXML
:: Attributes (12) -
REXML
:: Element (24) - Regexp (12)
- Resolv (12)
-
Resolv
:: Hosts (12)
モジュール
-
REXML
:: Namespace (60)
キーワード
- execute (12)
- getnames (24)
-
local
_ name (12) - name (12)
- namespace (24)
- namespaces (24)
- prefix (12)
- private (48)
-
private
_ class _ method (24) - protected (48)
- public (48)
-
public
_ class _ method (24)
検索結果
先頭5件
-
MatchData
# names -> [String] (18221.0) -
名前付きキャプチャの名前を文字列配列で返します。
...前を文字列配列で返します。
self.regexp.names と同じです。
//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").names
# => ["foo", "bar", "baz"]
m = /(?<x>.)(?<y>.)?/.match("a") # => #<MatchData "a" x:"a" y:nil>
m.names # => ["x", "y"]
//}... -
Regexp
# names -> [String] (18221.0) -
正規表現に含まれる名前付きキャプチャ(named capture)の名前を 文字列の配列で返します。
...正規表現に含まれる名前付きキャプチャ(named capture)の名前を
文字列の配列で返します。
//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)(?<baz>.)/.names
# => ["foo", "bar", "baz"]
/(?<foo>.)(?<foo>.)/.names
# => ["foo"]
/(.)(.)/.names
# => []
//}... -
Encoding
# names -> String (18209.0) -
エンコーディングの名前とエイリアス名の配列を返します。
...エンコーディングの名前とエイリアス名の配列を返します。
//emlist[例][ruby]{
Encoding::UTF_8.names #=> ["UTF-8", "CP65001"]
//}... -
REXML
:: Attributes # namespaces -> { String => String } (6303.0) -
self の中で宣言されている名前空間の集合を返します。
...p://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</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
:: Element # namespaces -> {String => String} (6303.0) -
self の文脈で定義されている名前空間の情報を返します。
...義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
//}... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (6202.0) -
属性の名前空間の URI を返します。
...//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.com/ns"
//}... -
REXML
:: Element # namespace(prefix=nil) -> String (6202.0) -
self の文脈で prefix が指している名前空間の URI を返します。
...ます。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/><y:d /></a>")
b = doc.elements['//b']
b.namespace # => "1"
b.namespace("y") # => "2"
b.namespace("z") # => nil
d = doc.elements['//y:d']
d.namespace # => "2"
//}... -
Resolv
# getnames(address) -> [String] (6202.0) -
IP アドレス address のホスト名をルックアップし、 ルックアップ結果のホスト名リストを返します。
IP アドレス address のホスト名をルックアップし、
ルックアップ結果のホスト名リストを返します。
@param address IPアドレスを文字列で与えます。 -
Resolv
:: Hosts # getnames(address) -> [String] (6202.0) -
IP アドレス address のホスト名をルックアップし、 ルックアップ結果のホスト名リストを返します。
IP アドレス address のホスト名をルックアップし、
ルックアップ結果のホスト名リストを返します。
@param address IPアドレスを文字列で与えます。