9件ヒット
[1-9件を表示]
(0.023秒)
ライブラリ
- ビルトイン (1)
-
irb
/ cmd / help (1) - rake (1)
-
rexml
/ document (6)
クラス
-
IRB
:: ExtendCommand :: Help (1) - MatchData (1)
-
REXML
:: Attribute (1) -
REXML
:: Attributes (1) -
REXML
:: DocType (1) -
REXML
:: Element (2)
モジュール
- Kernel (1)
-
REXML
:: Namespace (1)
キーワード
- attribute (1)
- execute (1)
-
get
_ attribute _ ns (1) -
has
_ name? (1) - namespace (3)
- namespaces (1)
検索結果
先頭5件
-
MatchData
# names -> [String] (54379.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"]
//} -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (18928.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.... -
Kernel
# namespace(name = nil) { . . . } -> Rake :: NameSpace (18907.0) -
新しい名前空間を作成します。
新しい名前空間を作成します。
与えられたブロックを評価する間は、その名前空間を使用します。
例:
ns = namespace "nested" do
task :run
end
task_run = ns[:run] # find :run in the given namespace.
@see Rake::TaskManager#in_namespace -
REXML
:: DocType # namespaces -> nil (18655.0) -
nil を返します。
nil を返します。 -
REXML
:: Element # namespace(prefix=nil) -> String (18643.0) -
self の文脈で prefix が指している名前空間の URI を返します。
self の文脈で prefix が指している名前空間の URI を返します。
prefix を省略すると、デフォルトの名前空間の URI を返します。
prefix で指示される名前空間の宣言が存在しない場合は nil を返します。
//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"
... -
REXML
:: Namespace # has _ name?(other , ns = nil) -> bool (9325.0) -
self が other と ns で指定した名前を持っているならば真を返します。
self が other と ns で指定した名前を持っているならば真を返します。
ns が nil でない場合は名前空間も比較されます。
other が ":" を含んでいる(つまり prefix を含んでいる)場合は
REXML::Namespace#fully_expanded_name と other を比較します。
どちらでもない場合は other と REXML::Namespace#name を直接
比較します。
@param other 比較する名前(文字列)
@param ns 比較する名前空間(文字列) -
REXML
:: Element # attribute(name , namespace = nil) -> REXML :: Attribute | nil (946.0) -
name で指定される属性を返します。
name で指定される属性を返します。
属性は REXML::Attribute オブジェクトの形で返します。
name は "foo:bar" のように prefix を指定することができます。
namespace で名前空間の URI を指定することで、その名前空間内で
name という属性名を持つ属性を指定できます。
指定した属性名の属性がない場合は nil を返します。
@param name 属性名(文字列)
@param namespace 名前空間のURI(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = R... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (682.0) -
RI から Ruby のドキュメントを参照します。
RI から Ruby のドキュメントを参照します。
irb(main):001:0> help String#match
...
@param names 参照したいクラス名やメソッド名などを文字列で指定します。
names を指定しなかった場合は、RI を対話的なモードで起動します。メソッド
名などを入力する事でドキュメントの検索が行えます。入力のタブ補完をする
事ができます。また、空行を入力する事で irb のプロンプトに戻る事ができま
す。
irb(main):001:0> help
Enter the method name you want to look... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (661.0) -
namespace と name で特定される属性を返します。
namespace と name で特定される属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使うことで属性を正しく指定することができます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.ne...