240件ヒット
[1-100件を表示]
(0.064秒)
ライブラリ
- ビルトイン (180)
-
irb
/ cmd / help (12) -
rexml
/ document (48)
クラス
- Encoding (12)
-
IRB
:: ExtendCommand :: Help (12) - MatchData (12)
- Module (144)
-
REXML
:: Attribute (12) -
REXML
:: Attributes (12) -
REXML
:: Element (24) - Regexp (12)
キーワード
- execute (12)
- namespace (24)
- namespaces (24)
- private (48)
-
private
_ class _ method (24) - public (48)
-
public
_ class _ method (24)
検索結果
先頭5件
-
MatchData
# names -> [String] (18328.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] (18328.0) -
正規表現に含まれる名前付きキャプチャ(named capture)の名前を 文字列の配列で返します。
...正規表現に含まれる名前付きキャプチャ(named capture)の名前を
文字列の配列で返します。
//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)(?<baz>.)/.names
# => ["foo", "bar", "baz"]
/(?<foo>.)(?<foo>.)/.names
# => ["foo"]
/(.)(.)/.names
# => []
//}... -
Encoding
# names -> String (18316.0) -
エンコーディングの名前とエイリアス名の配列を返します。
...エンコーディングの名前とエイリアス名の配列を返します。
//emlist[例][ruby]{
Encoding::UTF_8.names #=> ["UTF-8", "CP65001"]
//}... -
REXML
:: Attributes # namespaces -> { String => String } (6511.0) -
self の中で宣言されている名前空間の集合を返します。
...。
//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='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.namespaces
# => {"fo......o"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Element # namespaces -> {String => String} (6511.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 (6309.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.c... -
REXML
:: Element # namespace(prefix=nil) -> String (6309.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"
//}... -
Module
# private(name) -> String | Symbol (240.0) -
メソッドを private に設定します。
...@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
@raise NameError 存在しないメソッド名を指定した場合に発生します。
//emlist[例][ruby]{
class Foo
def foo1() 1 en... -
Module
# public(name) -> String | Symbol (240.0) -
メソッドを public に設定します。
...@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。
@raise NameError 存在しないメソッド名を指定した場合に発生します。
//emlist[例][ruby]{
def foo() 1 end
p foo...