86件ヒット
[1-86件を表示]
(0.134秒)
ライブラリ
- ビルトイン (14)
-
rexml
/ document (60) -
rubygems
/ package / tar _ header (12)
クラス
-
Gem
:: Package :: TarHeader (12) -
REXML
:: Attribute (12) -
REXML
:: Attributes (12) -
REXML
:: Element (24) - String (8)
- Symbol (6)
モジュール
-
REXML
:: Namespace (12)
キーワード
- namespace (12)
- prefixes (24)
-
start
_ with? (14)
検索結果
先頭5件
-
REXML
:: Attribute # prefix -> String (27345.0) -
属性の名前空間を返します。
...ML::Element.new( "elns:myelement" )
e.add_attribute( "nsa:a", "aval" )
e.add_attribute( "b", "bval" )
p e.attributes.get_attribute( "a" ).prefix # -> "nsa"
p e.attributes.get_attribute( "b" ).prefix # -> "elns"
a = REXML::Attribute.new( "x", "y" )
p a.prefix # -... -
REXML
:: Namespace # prefix -> String (27325.0) -
prefix (前置修飾子) を返します。
...prefix (前置修飾子) を返します。
@see REXML::Namespace#prefix=... -
Gem
:: Package :: TarHeader # prefix -> String (27319.0) -
tar のヘッダに含まれる prefix を返します。
...tar のヘッダに含まれる prefix を返します。... -
String
# start _ with?(*prefixes) -> bool (15361.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...先頭が prefixes のいずれかであるとき true を返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing......", "str") # => true
"string".start_with?(/\w/) # => true
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#delete_prefix!... -
REXML
:: Attributes # prefixes -> [String] (15342.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...いる prefix の集合を
文字列の配列で返します。
self が属する要素より上位の要素で定義されているものは含みません。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="htt......p://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}... -
REXML
:: Element # prefixes -> [String] (12336.0) -
self の文脈で定義されている prefix を文字列の配列を返します。
...る prefix を文字列の配列を返します。
対象の要素とその外側の要素で定義されている 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'].prefixes # =>... -
REXML
:: Element # namespace(prefix=nil) -> String (6443.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"
b.namespace("y") # => "2"
b.namespace("z") # => nil
d = doc.elements['//y:d']
d.namespace # => "2"
//}... -
Symbol
# start _ with?(*prefixes) -> bool (6307.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...elf の先頭が prefixes のいずれかであるとき true を返します。
(self.to_s.start_with?と同じです。)
@param prefixes パターンを表す文字列または正規表現 (のリスト)
@see Symbol#end_with?
@see String#start_with?
//emlist[][ruby]{
:hello.start_with?("hell"......) #=> true
:hello.start_with?(/H/i) #=> true
# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}...