るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. rexml/document prefixes
  2. element prefixes
  3. attributes prefixes
  4. prefixes rexml/document
  5. prefixes rexml::element

ライブラリ

クラス

検索結果

REXML::Attributes#prefixes -> [String] (54343.0)

self の中で宣言されている prefix の集合を 文字列の配列で返します。

self の中で宣言されている prefix の集合を
文字列の配列で返します。

self が属する要素より上位の要素で定義されているものは含みません。

//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' att='&lt;'/>
</root>
EOS
a = doc...

REXML::Element#prefixes -> [String] (54325.0)

self の文脈で定義されている prefix を文字列の配列を返します。

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"]
//}

String#start_with?(*prefixes) -> bool (373.0)

self の先頭が prefixes のいずれかであるとき true を返します。

self の先頭が 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
"strin...