るりまサーチ

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

別のキーワード

  1. string []=
  2. string []
  3. string slice
  4. string slice!
  5. string gsub

検索結果

<< < 1 2 >>

REXML::Element#namespace(prefix=nil) -> String (231.0)

self の文脈で prefix が指している名前空間の URI を返します。

...self の文脈で prefix が指している名前空間の URI を返します。

prefix
を省略すると、デフォルトの名前空間の URI を返します。

prefix
で指示される名前空間の宣言が存在しない場合は nil を返します。

//emlist[][ruby]{
require 'rexml/...

REXML::Attributes#namespaces -> { String => String } (209.0)

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

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

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

//emlist[][ruby]{
require 'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xm...

REXML::Element#namespaces -> {String => String} (209.0)

self の文脈で定義されている名前空間の情報を返します。

...で定義されている名前空間の情報を返します。

対象の要素とその外側の要素で定義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmln...

REXML::Namespace#expanded_name -> String (126.0)

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

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

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

@see REXML::Namespace#prefix...

REXML::Namespace#local_name -> String (119.0)

prefix を含まない「ローカルな」名前を返します。

...prefix を含まない「ローカルな」名前を返します。...

絞り込み条件を変える

REXML::Namespace#name -> String (119.0)

prefix を含まない「ローカルな」名前を返します。

...prefix を含まない「ローカルな」名前を返します。...

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

属性の名前空間の 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"
//}...

Symbol#start_with?(*prefixes) -> bool (107.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
//}...
<< < 1 2 >>