34件ヒット
[1-34件を表示]
(0.101秒)
別のキーワード
ライブラリ
- ビルトイン (12)
-
rexml
/ document (22)
クラス
-
REXML
:: Attributes (11) -
REXML
:: Element (11) - String (7)
- Symbol (5)
検索結果
先頭4件
-
REXML
:: Attributes # prefixes -> [String] (18114.0) -
self の中で宣言されている prefix の集合を 文字列の配列で返します。
...'
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.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}... -
REXML
:: Element # prefixes -> [String] (18108.0) -
self の文脈で定義されている 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 # => ["x", "y"]
//}... -
Symbol
# start _ with?(*prefixes) -> bool (130.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...self の先頭が prefixes のいずれかであるとき true を返します。
(self.to_s.start_with?と同じです。)
@param prefixes パターンを表す文字列または正規表現 (のリスト)
@see Symbol#end_with?
@see String#start_with?
//emlist[][ruby]{
:hello.start_with?("hel......l") #=> 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
//}... -
String
# start _ with?(*prefixes) -> bool (124.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...self の先頭が prefixes のいずれかであるとき true を返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_w...