るりまサーチ

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

別のキーワード

  1. _builtin lock_ex
  2. constants lock_ex
  3. sync_m ex
  4. sync ex
  5. sync sync_ex_count

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Regexp#names -> [String] (21319.0)

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

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

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

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

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

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

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

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

names
pace で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合...
...定することができます。

@param namespace 名前空間(URI, 文字列)
@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...
...ot/a").first

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

IRB::ExtendCommand::Help#execute(*names) -> nil (12413.0)

RI から Ruby のドキュメントを参照します。

...RI から Ruby のドキュメントを参照します。

i
rb(main):001:0> help String#match
...

@param names 参照したいクラス名やメソッド名などを文字列で指定します。

names
を指定しなかった場合は、RI を対話的なモードで起動します。メソ...
... irb のプロンプトに戻る事ができま
す。

i
rb(main):001:0> help

Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.

>> String#match
String#match

(from ruby core)
-
----------------------------------------------------...
...-------------------------
str.match(pattern) -> matchdata or nil
str.match(pattern, pos) -> matchdata or nil
......

REXML::Attribute#namespace(arg = nil) -> String | nil (12400.0)

属性の名前空間の URI を返します。

...URI を返します。

URI が定義されていない場合は nil を返します。

@param arg この値を指定すると、その属性の名前空間でなく、arg という名前空間
の 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::Attributes#namespaces -> { String => String } (12400.0)

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

...ます。

返り値は名前空間の prefix をキーとし、URI を値とする
Hash を返します。

//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' at...
...t='&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::Namespace#expanded_name -> String (12300.0)

REXML::Namespace#name= で設定された名前を返します。

...REXML::Namespace#name= で設定された名前を返します。

name= で指定した名前が prefix を含んでいれば
prefix を含む名前を返し、そうでなければ
prefix を含まない名前を返します。

@see REXML::Namespace#prefix...

REXML::Namespace#fully_expanded_name -> String (12300.0)

完全修飾名を返します。

完全修飾名を返します。

REXML::Namespace#prefix -> String (12200.0)

prefix (前置修飾子) を返します。

...prefix (前置修飾子) を返します。

@see REXML::Namespace#prefix=...

REXML::Element#attribute(name, namespace = nil) -> REXML::Attribute | nil (9500.0)

name で指定される属性を返します。

...name で指定される属性を返します。

属性は REXML::Attribute オブジェクトの形で返します。

name は "foo:bar" のように prefix を指定することができます。

names
pace で名前空間の URI を指定することで、その名前空間内で
name という...
...属性がない場合は nil を返します。

@param name 属性名(文字列)
@param namespace 名前空間のURI(文字列)
//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:a...
...tt='1' bar:att='2' att='&lt;'/>
</root>
EOS
a = doc.get_elements("/root/a").first
a.attribute("att") # => att='&lt;'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar:att='2'
a.attribute("baz") # => nil
//}...

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

絞り込み条件を変える

<< 1 2 3 > >>