るりまサーチ

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

別のキーワード

  1. string []=
  2. string []
  3. string slice!
  4. string slice
  5. string gsub!

ライブラリ

モジュール

オブジェクト

検索結果

<< 1 2 3 ... > >>

MatchData#names -> [String] (18220.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] (18220.0)

正規表現に含まれる名前付きキャプチャ(named capture)の名前を 文字列の配列で返します。

...正規表現に含まれる名前付きキャプチャ(named capture)の名前を
文字列の配列で返します。

//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)(?<baz>.)/.names

# => ["foo", "bar", "baz"]
/(?<foo>.)(?<foo>.)/.names
# => ["foo"]

/(.)(.)/.names
# => []
//}...

Encoding#names -> String (18208.0)

エンコーディングの名前とエイリアス名の配列を返します。

...エンコーディングの名前とエイリアス名の配列を返します。

//emlist[例][ruby]{
Encoding::UTF_8.names #=> ["UTF-8", "CP65001"]
//}...

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

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

...p://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::Element#namespaces -> {String => String} (6302.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"}
//}...

絞り込み条件を変える

RubyVM::INSTRUCTION_NAMES -> [String] (6202.0)

RubyVM の命令シーケンスの名前の一覧を返します。

RubyVM の命令シーケンスの名前の一覧を返します。

@see RubyVM::InstructionSequence

REXML::Attribute#namespace(arg = nil) -> String | nil (6201.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 (6201.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] (6201.0)

IP アドレス address のホスト名をルックアップし、 ルックアップ結果のホスト名リストを返します。

IP アドレス address のホスト名をルックアップし、
ルックアップ結果のホスト名リストを返します。

@param address IPアドレスを文字列で与えます。
<< 1 2 3 ... > >>