るりまサーチ

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

別のキーワード

  1. erb u
  2. matrix u
  3. util u
  4. _builtin koi8_u
  5. encoding koi8_u

検索結果

<< 1 2 > >>

REXML::Attribute#prefix -> String (21120.0)

属性の名前空間を返します。

...uby]{
require 'rexml/document'
e = REXML::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::Attributes#get_attribute_ns(namespace, name) -> REXML::Attribute | nil (9213.0)

namespace と name で特定される属性を返します。

...る属性を返します。

namespace で名前空間を、 name で prefix を含まない属性名を
指定します。

指定された属性が存在しない場合は nil を返します。

XML プロセッサが prefix を置き換えてしまった場合でも、このメソッドを
使...
...ことで属性を正しく指定することができます。

@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)

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

doc = REXML::Document.new(<<-EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/...
...et_elements("/root/a").first

a.attributes.get_attribute_ns("", "att") # => att='&lt;'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "attt...

REXML::Attributes#prefixes -> [String] (9117.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.get_elements("/root/a").first

p doc.root.attributes.prefixes # => ["foo", "bar"]
p a.attributes.prefixes # => []
//}...

REXML::SAX2Listener#start_prefix_mapping(prefix, uri) -> () (6343.0)

名前空間の接頭辞(prefix)が導入されたときに呼び出される コールバックメソッドです。

...名前空間の接頭辞(prefix)が導入されたときに呼び出される
コールバックメソッドです。

以下のようなXMLを処理
<a xmlns:foo="http://foo.example.org/">
<foo:b />
</a>
すると
start_prefix_mapping("foo", "http://foo.example.org/")
start_element(nil,...
..."a", "a")
end_prefix_mapping("foo")
の順で呼びだされます。つまり名前空間を導入した要素の start_element の前に
start_prefix_mapping が呼びだされます。

@param prefix 接頭辞の文字列が渡されます
@param uri 接頭辞に対応する URI 文字列が...

REXML::Namespace#prefix=(value) (6230.0)

prefix (前置修飾子) を設定します。

...prefix (前置修飾子) を設定します。

@param value prefix文字列
@see REXML::Namespace#prefix...

絞り込み条件を変える

REXML::Element#attribute(name, namespace = nil) -> REXML::Attribute | nil (6207.0)

name で指定される属性を返します。

...ame で指定される属性を返します。

属性は REXML::Attribute オブジェクトの形で返します。

name は "foo:bar" のように prefix を指定することができます。

namespace で名前空間の URI を指定することで、その名前空間内で
name という...
...前空間のURI(文字列)
//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.get_elements("/root/a").first
a.attribute("att") #...
...=> att='&lt;'
a.attribute("att", "http://example.org/bar") # => bar:att='2'
a.attribute("bar:att") # => bar:att='2'
a.attribute("baz") # => nil
//}...

String#delete_suffix!(suffix) -> self | nil (6207.0)

self の末尾から破壊的に suffix を削除します。

...末尾から破壊的に suffix を削除します。

@param suffix 末尾から削除する文字列を指定します。

@return 削除した場合は self、変化しなかった場合は nil

//emlist[][ruby]{
"hello".delete_suffix!("llo") # => "he"
"hello".delete_suffix!("hel") # => nil
//}...
...@see String#chomp!
@see String#chop!
@see String#delete_prefix!
@see String#delete_suffix
@see String#end_with?...

String#delete_suffix(suffix) -> String (6207.0)

文字列の末尾から suffix を削除した文字列のコピーを返します。

...から suffix を削除した文字列のコピーを返します。

@param suffix 末尾から削除する文字列を指定します。

@return 文字列の末尾から suffix を削除した文字列のコピー

//emlist[][ruby]{
"hello".delete_suffix("llo") # => "he"
"hello".delete_suffix("he...
...l") # => "hello"
//}

@see String#chomp
@see String#chop
@see String#delete_prefix
@see String#delete_suffix!
@see String#end_with?...

IRB::OutputMethod#ppx(prefix, *objs) -> object (6124.0)

引数 prefix + 各 obj を inspect した文字列を self に出力し、最後に改行 を出力します。

...引数 prefix + 各 obj を inspect した文字列を self に出力し、最後に改行
を出力します。

@param prefix 各 obj の先頭に追記する文字列を指定します。

@param objs 任意のオブジェクトを指定します。...

Psych::Handler#start_document(version, tag_directives, implicit) -> () (6107.0)

YAML ドキュメントの始まりで呼び出されます。

...がない場合は空の配列が渡されます。

tag_directives には tag directive の配列が渡されます。
それぞれの tag は [prefix, suffix] という配列で表現されます。

implicit にはドキュメントが implicit に始まっているかどうかが
真偽値で渡...
...tenderlovemaking.com,2009:
--- !squee
start_document に渡される引数は以下の通りです
version # => [1, 1]
tag_directives # => tenderlovemaking.com,2009:"
implicit # => false

以下の YAML に対しては
- x
- y
start_document に渡される引数は以下...
...の通りです。
version # => []
tag_directives # => []
implicit # => true...

絞り込み条件を変える

<< 1 2 > >>